Handling Exceptions

All applications have to deal with exceptional situations. See Exceptional Value. Exception

Arithmetic errors may occur (such as division by zero), unexpected situations may arise (file not found), or resources may be exhausted (network down, disk full, etc.). The old-fashioned solution is to have operations that fail return a special error code; this means that client code must check the return value of each operation, and take special action to handle errors. This leads to brittle code.

Pharo’s exception handling follows the ANSI standard, with some embellishments; we present it in this chapter from a user perspective. pdf (wayback)