-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Tcl/Tk 8.5 Programming Cookbook
In this chapter, we will cover:
Using the catch command
Using the eval command
Using the error command
Error handling procedure
As discussed in the introduction to this book, I eventually learned the true power of the Tcl shell and how it can be used to locate and diagnose issues within the code. By using the puts statement I was able to track changes in variables and isolate sections of the code that were presenting issues.
In this chapter we will investigate the commands built into the Tcl shell that allow for more elegant error handling and isolation of sections of code to ensure that they perform correctly before proceeding with a procedure.
Error handling within Tcl allows the developer the freedom to determine how to react to an error. In the following sections we will explore Tcl error handling by implementing these control constructs to illustrate how you can use error handling to proceed with the command without raising an error or returning a Tcl...
Change the font size
Change margin width
Change background colour