typed_result library

Classes

Err<E>
HasResultError
HasResultValue
Ok<T>
Result<T, E>

Functions

runCatching<T>(T block()) Result<T, Object>
Executes the provided block, catching any exception if thrown. If the block finishes normally, a Ok will be returned with the value returned. Any exception thrown will create an Err of Object type.