mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 07:05:35 +03:00
Allow CrashLogsManager to handle generic Throwables (#4106)
This commit is contained in:
parent
655beb9dd6
commit
a9b6f296d8
3 changed files with 5 additions and 5 deletions
|
@ -12,5 +12,5 @@ class CrashLogsManagerImpl(
|
|||
) : CrashLogsManager {
|
||||
override var isEnabled: Boolean = true
|
||||
|
||||
override fun trackNonFatalException(e: Exception) = Unit
|
||||
override fun trackNonFatalException(throwable: Throwable) = Unit
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ interface CrashLogsManager {
|
|||
var isEnabled: Boolean
|
||||
|
||||
/**
|
||||
* Tracks an exception if logs are enabled.
|
||||
* Tracks a [Throwable] if logs are enabled.
|
||||
*/
|
||||
fun trackNonFatalException(e: Exception)
|
||||
fun trackNonFatalException(throwable: Throwable)
|
||||
}
|
||||
|
|
|
@ -22,9 +22,9 @@ class CrashLogsManagerImpl(
|
|||
Firebase.crashlytics.isCrashlyticsCollectionEnabled = value
|
||||
}
|
||||
|
||||
override fun trackNonFatalException(e: Exception) {
|
||||
override fun trackNonFatalException(throwable: Throwable) {
|
||||
if (settingsRepository.isCrashLoggingEnabled) {
|
||||
Firebase.crashlytics.recordException(e)
|
||||
Firebase.crashlytics.recordException(throwable)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue