extractCause

fun Error.extractCause(): Throwable?

Extracts the cause from Error object or null if it's not available.

Return

The Throwable that is the error's cause or null if not available.