arrow-core-data / arrow.core / NonFatal

NonFatal

fun NonFatal(t: Throwable): Boolean

Extractor of non-fatal Throwable. Will not match fatal errors like VirtualMachineError (for example, OutOfMemoryError and StackOverflowError, subclasses of VirtualMachineError), ThreadDeath, LinkageError, InterruptedException. This will also not match CancellationException since that’s a fatal exception in Kotlin for cancellation purposes.

Checks whether the passed t Throwable is NonFatal.

Parameters

t - the Throwable to check

Return true if the provided Throwable is to be considered non-fatal, or false if it is to be considered fatal

Do you like Arrow?

Arrow Org
<