ErrorHandler

open class ErrorHandler : Thread.UncaughtExceptionHandler

Handle your errors automatically. Send them to sentry, output them to the console and/or write them to the error log!

Constructors

Link copied to clipboard
open fun ErrorHandler()
Its not recommended to use the instance.

Functions

Link copied to clipboard
open fun enableCatchUncaughtException()
Enable the exception handling for uncaught exceptions.
Link copied to clipboard
open fun enableErrorLogFile()
Enable the 'error.log' file to which the stack traces will also be written.
Link copied to clipboard
open fun enableSentry(sentryDns: String)
open fun enableSentry(sentryDns: String, tracesSampleRate: Double, release: String)
To enable sentry reporting past the sentry dns string to this function!
Link copied to clipboard
open fun handle(e: Throwable)
Handle an exception.
open fun handle(e: Throwable, level: SentryLevel, debugInformation: Array<String>)
Handle an exception and send more data to Sentry.
Link copied to clipboard
open fun handleFatal(e: Throwable)
open fun handleFatal(e: Throwable, exitCode: Int)
Handle an exception and exit the program with exit a non zero exit code.
Link copied to clipboard
open fun uncaughtException(t: Thread, e: Throwable)
Internal function from the UncaughtExceptionHandler implementation.