utils/exceptions library

Functions

tryOr<T>(T? defaultValue, T closure()) → T?
Returns the result of the given closure, or default if an Exception was raised.
tryOrNull<T>(T closure()) → T?
Returns the result of the given closure, or null if an Exception was raised.
waitTryOr<T>(T? defaultValue, Future<T?> closure()) Future<T?>
Returns the result of the given closure, or default if an Exception was raised.
waitTryOrNull<T>(Future<T?> closure()) Future<T?>
Returns the result of the given closure, or null if an Exception was raised.