handle

fun Exception.handle(tag: String? = null, severity: Int = Log.ERROR)

Handles an exception by executing the custom exception handler lambda passed to setCustomExceptionHandler. If no custom handler is set, the exception is logged to Android's logcat.

Parameters

tag

An optional tag to identify the context of the log, can be null.

severity

An optional severity level to indicate the importance of the log message, defaults to Log.ERROR.