For #16330 - Replaces Sentry.capture with submitCaughtException

upstream-sync
codrut.topliceanu 3 years ago committed by mergify[bot]
parent 8a33d56dfa
commit 2c538dbb5d

@ -14,7 +14,6 @@ import androidx.core.view.isVisible
import com.google.android.material.button.MaterialButton
import com.google.android.material.textfield.TextInputEditText
import com.google.android.material.textfield.TextInputLayout
import io.sentry.Sentry
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Dispatchers.IO
@ -198,13 +197,13 @@ class MasterPasswordTipProvider(
context.components.core.passwordsStorage.add(it)
} catch (e: InvalidRecordException) {
// This record was invalid and we couldn't save this login
Sentry.capture("Master Password migration add login error $e for reason ${e.message}")
context.components.analytics.crashReporter.submitCaughtException(e)
} catch (e: IdCollisionException) {
// Nonempty ID was provided
Sentry.capture("Master Password migration add login error $e")
context.components.analytics.crashReporter.submitCaughtException(e)
} catch (e: LoginsStorageException) {
// Some other error occurred
Sentry.capture("Master Password migration add login error $e")
context.components.analytics.crashReporter.submitCaughtException(e)
}
}
withContext(Dispatchers.Main) {

@ -7,7 +7,6 @@ package org.mozilla.fenix.experiments
import android.content.Context
import android.net.Uri
import android.os.StrictMode
import io.sentry.Sentry
import mozilla.components.service.nimbus.NimbusApi
import mozilla.components.service.nimbus.Nimbus
import mozilla.components.service.nimbus.NimbusAppInfo
@ -84,7 +83,7 @@ fun createNimbus(context: Context, url: String?): NimbusApi =
// Something went wrong. We'd like not to, but stability of the app is more important than
// failing fast here.
if (isSentryEnabled()) {
Sentry.capture(e)
context.components.analytics.crashReporter.submitCaughtException(e)
} else {
Logger.error("Failed to initialize Nimbus", e)
}

Loading…
Cancel
Save