Try-Except

Try to run a brick, and recover on error

by @pixiebrix

How to Use

When adding the Try-Except brick two flows are added inside the brick: “try” and “except”. The bricks in the “try” flow will execute after the Try-Except brick. If any of those bricks error, that flow will stop before reaching the end and the “except” flow will start executing instead of ending the extension’s execution.

When the Try-Except brick catches an error, that error is put into the variable defined in the brick under ‘errorKey’, allowing you to use that information to better handle the error (for example, putting the error text in an alert).


Inputs

Name Required Type Description
try integration The bricks to try executing
except integration The bricks to run if an error occurs
errorKey string

Outputs

Name Required Type Description
No outputs for this brick defined.

Related Tags