mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/16330 - Replaces Sentry.capture with submitCaughtException
This commit is contained in:
parent
f586263314
commit
33eaa6f12d
@ -14,7 +14,6 @@ import androidx.core.view.isVisible
|
|||||||
import com.google.android.material.button.MaterialButton
|
import com.google.android.material.button.MaterialButton
|
||||||
import com.google.android.material.textfield.TextInputEditText
|
import com.google.android.material.textfield.TextInputEditText
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
import com.google.android.material.textfield.TextInputLayout
|
||||||
import io.sentry.Sentry
|
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
@ -198,13 +197,13 @@ class MasterPasswordTipProvider(
|
|||||||
context.components.core.passwordsStorage.add(it)
|
context.components.core.passwordsStorage.add(it)
|
||||||
} catch (e: InvalidRecordException) {
|
} catch (e: InvalidRecordException) {
|
||||||
// This record was invalid and we couldn't save this login
|
// 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) {
|
} catch (e: IdCollisionException) {
|
||||||
// Nonempty ID was provided
|
// Nonempty ID was provided
|
||||||
Sentry.capture("Master Password migration add login error $e")
|
context.components.analytics.crashReporter.submitCaughtException(e)
|
||||||
} catch (e: LoginsStorageException) {
|
} catch (e: LoginsStorageException) {
|
||||||
// Some other error occurred
|
// Some other error occurred
|
||||||
Sentry.capture("Master Password migration add login error $e")
|
context.components.analytics.crashReporter.submitCaughtException(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
|
@ -7,7 +7,6 @@ package org.mozilla.fenix.experiments
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.StrictMode
|
import android.os.StrictMode
|
||||||
import io.sentry.Sentry
|
|
||||||
import mozilla.components.service.nimbus.NimbusApi
|
import mozilla.components.service.nimbus.NimbusApi
|
||||||
import mozilla.components.service.nimbus.Nimbus
|
import mozilla.components.service.nimbus.Nimbus
|
||||||
import mozilla.components.service.nimbus.NimbusAppInfo
|
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
|
// Something went wrong. We'd like not to, but stability of the app is more important than
|
||||||
// failing fast here.
|
// failing fast here.
|
||||||
if (isSentryEnabled()) {
|
if (isSentryEnabled()) {
|
||||||
Sentry.capture(e)
|
context.components.analytics.crashReporter.submitCaughtException(e)
|
||||||
} else {
|
} else {
|
||||||
Logger.error("Failed to initialize Nimbus", e)
|
Logger.error("Failed to initialize Nimbus", e)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user