Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
package com.flipcash.app.internal.startup

import com.bugsnag.android.Bugsnag
import com.bugsnag.android.Severity
import com.getcode.utils.ErrorReporter

class BugsnagErrorReporter : ErrorReporter {
override fun report(error: Throwable, cause: Throwable, isNotifiable: Boolean) {
if (!isNotifiable) return
if (!Bugsnag.isStarted()) return
Bugsnag.notify(error)
Bugsnag.notify(error) { event ->
// WARNING = needs active attention (also drives the Slack filter);
// INFO = recorded for reference only, excluded from Slack.
event.severity = if (isNotifiable) Severity.WARNING else Severity.INFO
true
}
}
}
Loading