Tcl Powered!NeoWebScript

Home
 
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
TRY_EVAL - Extended TCL
Synopsis * Description * Keywords

Evaluates code in the current context

Synopsis

  • try_eval code catch ?finally?

Description

If an error occurs during the evaluation and catch is not empty, then catch is evaluated to handler the error. The result of the command, containing the error message, will be stored in a global variable errorResult. The global variables errorResult, errorInfo and errorCode will be imported into the current scope, there is no need to exe- cute a global command. The result of the catch command becomes the result of the try_eval command. If the error that caused the catch to be evaluate is to be continued, the following command should be used:

            error $errorResult $errorCode $errorInfo
If the finally argument is supplied and not empty, it is evaluated after the evaluation of the code and the catch commands. If an error occurs during the evaluation of the finally command, it becomes the result of the try_eval command. Otherwise, the result of either code or catch is preserved, as described above.

Keywords

evaluate try eval

Copyright © 1995-1999 NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA. All Rights Reserved