An error handler is a function that responds to an error. In general, when a program executes, the flow of control moves from one expression to the next, possibly passing into and out of function calls, and following branches and loops as necessary. If an error occurs, however, the flow of control will not move to the next expression, but will jump immediately to the most recently declared error handler, either through the protect/unwind or the try/catch constructs. These constructs are the two pairs of functions available in Gamma which allow for trapping and handling errors. See Tutorial II for more details.
The combination of signal handlers and error handlers can cause a program to jump to a predefined point at any time during its execution. An error can be explicitly caused by a call to the error function.
Gamma is a very robust language, particularly in comparison to programming in C. However, the power and ease of use can sometimes lead a programmer to create situations that could crash the Gamma engine. Generally these are errors that would certainly have crashed a C program, and would be considered part of the debug cycle. The following list highlights some situations where care must be taken:
Having said these things, we are always interested in hearing about new ways that we can make Gamma more robust. Please don't hesitate to let us know if you find a weak spot.
Copyright © 1995-2006 by Cogent Real-Time Systems, Inc. All rights reserved.