Try Catch
try...catch
works synchronously- To catch an exception inside a scheduled function,
try...catch
must be inside that function:
- To catch an exception inside a scheduled function,
try...catch
only works for runtime errors- For
try...catch
to work, the code must be runnable. In other words, it should be valid JavaScript.
- For
Throw Operator
Finally
The finally
clause is a great place to finish the measurements no matter what.
Variables are local inside try...catch...finally