Problem
You think that something you are writing in a Script or an Expression could possibly fail.Solution
The function PossiblyEvilFunction() might fail. To make sure it won't crash your Script, call PossiblyEvilFunction() inside the ERROR function.
If PossiblyEvilFunction() fails, the second argument of the ERROR function will be evaluated. Here, we're setting $error to true if PossiblyEvilFunction() fails.
Then, we check whether $error is true. If so, we can do something to fix the issue, possibly alerting a user about the error.
If PossiblyEvilFunction() returns a result you are interested in, you can use the following code:
Comments (2)


