mirror of
https://github.com/bitwarden/android.git
synced 2026-03-12 05:04:17 -05:00
Allow CrashLogsManager to handle generic Throwables (#4106)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user