kotlin-stdlib / kotlin / Result / exceptionOrNull exceptionOrNull Common JVM JS Native 1.0 fun exceptionOrNull(): Throwable? Returns the encapsulated Throwable exception if this instance represents failure or null if it is success. This function is a shorthand for fold(onSuccess = { null }, onFailure = { it }) (see fold).