Skip to main content

Handling error

Sometimes, the application is making great use of error handling and wants to document these errors, or has some definitive points where caught errors could use a bit more context.

Shake SDK enables you to report the caught errors and lets you decide how they are grouped. These non-fatal error reports will have all of the same contextual information as crash reports, and act as an extension to the crash reporting feature.

note

Avoid using unique values for error clusterID as this will cause a large number of reported errors appear unrelated โ€” although they actually are โ€” which will clog your Shake dashboard.

MainActivity.kt
try {
throw ClassNotFoundException("Handled test exception")
} catch (e: Exception) {
Shake.handleError(e, "cluster-id")
}