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

Top level error trap

ErrorTopLevelCatch(3tlib) 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: Initializing the manager

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005