Runtime Error Handling
An example of a runtime error is an attempt to read a non-existent variable. TclPro Debugger detects all runtime errors, including both those caught and those not caught by a Tcl script. How TclPro Debugger handles runtime errors depends on the Error settings that you specify for your project. (See "Changing Project Error Settings" for more information on specifying your project Error settings.) If you have set:
- Always Stop on Errors: TclPro Debugger notifies you each time it encounters an error in the script.
- Only Stop on Uncaught Errors: TclPro Debugger notifies you only when it encounters an error not caught by the script.
- Never Stop on Errors: TclPro Debugger does not notify you when it encounters errors in the application. Your application handles errors in the same manner as it would if it were not running under TclPro Debugger.
When TclPro Debugger detects a runtime error in accordance with the rules above, it stops execution of your application and displays a dialog box such as the one shown in Figure 18.Figure 18 The TclPro Debugger Tcl Error Dialog
You have the choice of either delivering the error or suppressing the error:
- Deliver Error: The application continues and the error is handled in the normal fashion for Tcl. Clicking this button is equivalent to having run the script without any debugger interference.
- Suppress Error: TclPro Debugger suppresses the error, and continues executing the application. The behavior in this case is as if no error had occurred. You can continue to run or step through the application.
While your application is stopped, you can examine your Tcl script, view and change variable values, set breakpoints, and use all the other features of TclPro Debugger. If you single-step or run your application without first selecting whether to deliver or suppress the error, TclPro Debugger delivers the error if your application catches it and suppresses it otherwise.
Voice: (650) 210-0100
Fax: (650) 210-0101