Try
Attempts to run the given action or passes the error message to the given function if the action fails.
Syntax
Action.Try
· [action]
· [catcher]
Parameters
- action
- The action to run.
- catcher
- A function that takes a string and returns an action.
Return Value
The result of the given action if it runs successfully or the result of the action returned by catcher
if the action fails.