From a9b6f296d81b757e40a8ea316106349196aabbd3 Mon Sep 17 00:00:00 2001 From: David Perez Date: Thu, 17 Oct 2024 08:55:41 -0500 Subject: [PATCH] Allow CrashLogsManager to handle generic Throwables (#4106) --- .../bitwarden/data/platform/manager/CrashLogsManagerImpl.kt | 2 +- .../x8bit/bitwarden/data/platform/manager/CrashLogsManager.kt | 4 ++-- .../bitwarden/data/platform/manager/CrashLogsManagerImpl.kt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/fdroid/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManagerImpl.kt b/app/src/fdroid/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManagerImpl.kt index a0c034fcf..398b7f165 100644 --- a/app/src/fdroid/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManagerImpl.kt +++ b/app/src/fdroid/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManagerImpl.kt @@ -12,5 +12,5 @@ class CrashLogsManagerImpl( ) : CrashLogsManager { override var isEnabled: Boolean = true - override fun trackNonFatalException(e: Exception) = Unit + override fun trackNonFatalException(throwable: Throwable) = Unit } diff --git a/app/src/main/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManager.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManager.kt index c67b7d1cb..dd0ec0172 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManager.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManager.kt @@ -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) } diff --git a/app/src/standard/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManagerImpl.kt b/app/src/standard/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManagerImpl.kt index 7a24649ef..dceffe3b6 100644 --- a/app/src/standard/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManagerImpl.kt +++ b/app/src/standard/java/com/x8bit/bitwarden/data/platform/manager/CrashLogsManagerImpl.kt @@ -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) } }