io.sureshg.extn / kotlin.Throwable

Extensions for kotlin.Throwable

rootCause

val Throwable?.rootCause: Throwable?

Get the root cause by walks through the exception chain to the last element, "root" of the tree, using Throwable.getCause, and returns that exception.