Skip to main content

Handling error

Make great use of error handling and document these errors.

Shake allows you to report those caught errors and group them together. These non-fatal error reports will have all of the same contextual information as crash reports and will act as an extension to the crash reporting feature.

note

Avoid using unique values for error clusterID as that would cause a large number of reported errors to stay unrelated and ungrouped, which would clog your Shake dashboard.

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