December 2003
Beginner
288 pages
7h 8m
English
As with the design of constructors, designing how a class handles errors is of vital importance. Error handling is discussed in detail in Chapter 3.
It is almost certain that every system will encounter unforeseen problems. Thus, it is not a good idea to simply ignore potential errors. The developer of a good class (or any code, for that matter) anticipates potential errors and includes code to handle these conditions when they are encountered.
The rule of thumb is that the application should never crash. When an error is encountered, the system should either fix itself and continue, or exit gracefully without losing any data that's important to the user.
The topic of ...
Read now
Unlock full access