Implements error handling.
||Tracked script code|
||The Exception object containing properties that can be used to identify additional details regarding the error:
Error name. This is just an error type identifier, for example "RangeError"
Error description. Contains detailed description, sometimes including the nomber of row where the error occured.
||Script code executed while the error occured|
If an error occurs in any statement in the try-statements
section (e.g. division by zero, calling undefined method, ...), then the script is not terminated (the script would be terminated if the try
statement is not used), but it jumps into the catch-statements
The whole statement consists of try
sections that are compulsory. There is also the finally
section that is not used by the PROMOTIC system and therefore not described in this documentation.
For similar purpose in the VBScript language
is used the statement On Error
Processing of the script error (division by zero)
var x = 0;
var y = 10 / x;
Pm.Debug("script error: " + ex.message);