OpenWGA 7.10 - TMLScript referenceWGA
logException([msg, ] error)
This is a convenience method to cope with unexpected exceptions in TMLScript code, so that they are logged and can be analyzed.
msg (String, Optional): A message that is put out with the error
error: An Error object like it is thrown in TMLScript.
|Allowed in script types||
The following code template may be used in all TMLScripts with longer/more complicated operations, which may throw unexpected errors. The whole procedure is wrapped in a try/catch block. In the catch block the caught error is logged via logExcepion():