User Tools

Site Tools


dictionary:errors:index

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dictionary:errors:index [2020/05/21 13:20] – added see also James Sentmandictionary:errors:index [2023/02/13 14:52] (current) – external edit 127.0.0.1
Line 1: Line 1:
 =====Script Error Handling===== =====Script Error Handling=====
  
-If an unhandled error occurs in a script of any kind it will cause a global script named the **Interface Error Script** to be executed. Depending on where the error is coming from the ThisUnit, ThisScript or ThisInterface globals may also be set to indicate in what script or unit script or interface script the error occurred. The fact that all script errors are passed to a script that previously was run only for an interface error may be slightly confusing but is preserved for historical reasons so as to not break existing users script error handling.+If an unhandled error occurs in a script of any kind it will cause a Global Script named the **Script Error Alert** to be executed. Depending on where the error is coming from the [[dictionary:unitinformation:thisunit|ThisUnit]][[dictionary:events:thisscript|ThisScript]] or [[dictionary:xtension:thisinterface|ThisInterface]] globals may also be set to indicate in what script or unit script or interface script the error occurred.
  
-Other things may also cause the **Interface Error Script** to execute such as an interface being reset due to it becoming unresponsive. For modern error handling not related to scripts most interfaces offer an on error handler that will be called with more information in the individual script. Use the “Insert” toolbar item of the Interface script to insert the handler with information on it’s use. 
  
-Inside the **Interface Error Script** you can use the **Last Error**, **Last Error Message**, and **Last Error Date** verbs to get the error message and exact time for logging or alerts as needed.+Inside the **Script Error Alert** you can use the **Last Error**, **Last Error Message**, and **Last Error Date** verbs to get the error message and exact time for logging or alerts as needed
 + 
 +If a scripting error occurs in the **Script Error Alert** script that will not cause the script to be executed again to avoid an infinite recursion and eventual crash situation. Any error in the error handling script will be written to the log with as much information as possible but will not cause other actions to happen.
  
 ====See Also:==== ====See Also:====
dictionary/errors/index.1590067214.txt.gz · Last modified: 2023/02/13 14:51 (external edit)