try
for core
Try to run a block, if it fails optionally run a catch block.
Signature
> try {flags} (try_block) (catch_block)
Parameters
try_block
: Block to run.catch_block
: Block to run if try block fails.
Input/output types:
input | output |
---|---|
any | any |
Examples
Try to run a missing command
> try { asdfasdf }
Try to run a missing command
> try { asdfasdf } catch { 'missing' }
missing