274 ◾ Software Essentials
9.1.1 Exceptions and Software Design
Exceptions reect a structured approach to processing errors. All execu-
tions change the state of a program; the intent of exception handling is to
recover from the state of an error condition so that normal processing may
resume. An exception handler may generate a summary or detailed trace
of the execution state when an exception occurs, but is not required to
do so. Normal execution, and its associated output, is suspended while
the exception handler unwinds the stack and looks for a matching catch
clause.
From the soware design perspective, what does exception handling
cost? To some, the wrapping of code in try blocks, with associated catch
blocks, clutters code. Spec ...