19.1 Handling Exceptional
Situations - Example
- Imagine that pop is called on an empty Stack
- P2 didn't understand the i/f, or
- P2 wrote a function that had a logic error
- P1 is unaware of the application P2 is creating
- P2 is in a better position to recover from the error
- Stack must report the error to the application written by
P2
prev
|top
|next