|
|||
Download User Info New User FAQ Tutorials Demos Commands Variables Troubleshooting Sysop Info Sysop FAQ Theory Installation Management Tests Troubleshooting Feedback Resources Release Notes Credits Disclaimer |
Synopsis * Description * Keywords Evaluate script and trap exceptional returns
The catch command may be used to prevent errors from aborting command interpretation. Catch calls the Tcl interpreter recursively to execute script, and always returns a TCL_OK code, regardless of any errors that might occur while executing script. The return value from catch is a decimal string giving the code returned by the Tcl interpreter after executing script. This will be 0 (TCL_OK) if there were no errors in script; otherwise it will have a non-zero value corresponding to one of the exceptional return codes (see tcl.h for the definitions of code values). If the varName argument is given, then it gives the name of a variable; catch will set the variable to the string returned from script (either a result or an error message). Note that catch catches all exceptions, including those generated by break and continue as well as errors.
catch, error
|
||
Copyright © 1995-1999 NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA. All Rights Reserved |