|
|
ErrorTopLevelCatch(TCL_ADM) wraps around the execution of the manager and acts as the safety net for errors. The arguments are the name of the procedure and the name of the script. In this example from the template, the name of the script is stored in a global array appvals:
ErrorTopLevelCatch {Main} $appvals(script)If an error occurs and it falls all the way back to this catch, the error is logged and a message sent to the standard output. The stack is then dumped to a file in /tmp (this is the equivalent of a core dump for Tcl programs.) This routine should be placed around the top level code in a program, excluding procedure definitions.
See also: