mirror of
https://github.com/revanced/revanced-manager-compose-old.git
synced 2025-04-29 22:14:28 +02:00
feat: exclude CancellationException from sentry
This commit is contained in:
parent
cf49b49494
commit
9344b68a05
@ -24,6 +24,7 @@ import dev.olshevski.navigation.reimagined.*
|
||||
import io.sentry.SentryOptions
|
||||
import io.sentry.android.core.SentryAndroid
|
||||
import org.koin.android.ext.android.inject
|
||||
import java.util.concurrent.CancellationException
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
private val prefs: PreferencesManager by inject()
|
||||
@ -35,6 +36,7 @@ class MainActivity : ComponentActivity() {
|
||||
it.dsn = if (prefs.sentry) BuildConfig.SENTRY_DSN else ""
|
||||
it.environment = BuildConfig.BUILD_TYPE
|
||||
it.release = BuildConfig.VERSION_NAME
|
||||
it.addIgnoredExceptionForType(CancellationException::class.java)
|
||||
|
||||
it.beforeSend = SentryOptions.BeforeSendCallback { event, _ ->
|
||||
if (prefs.sentry) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user