exceptionOrNull

Returns the exception associated with a failed operation or null if the operation was successful.

Return

an Exception instance if this result represents a failure, or null if it represents a success.