Try-Except

by @pixiebrix

Try to run a brick, and recover on error


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.

@pixiebrix/try-catch

Version

1.7.16

Created

June 2, 2022

Updated

Oct. 31, 2022