Execute a block of code, catching any errors of the specified types and returning them as Err.
Err
If no errors are specified, the block will be executed as if it were passed to trying.
trying
The expected error types to catch from the block.
The block of code to execute.
The result of the block wrapped in an Ok, or an Err containing any error thrown by the block.
Ok
Execute a block of code, catching any errors of the specified types and returning them as
Err
.If no errors are specified, the block will be executed as if it were passed to
trying
.