DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Writing a SCOadmin manager

Top level error trap

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:


Next topic: Local host name
Previous topic: Starting the manager

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003