Page 212 - Beginning Programming with Pyth - John Paul Mueller
P. 212
the order in which it receives them. Consequently, you may find that an application outputs what appears to be the wrong error message at times.
8. Perform Steps 3 and 4 again, but type 5.5 instead of Hello.
The application generates the same error message as before (again, refer to Figure 10-1). In this case, no interrupt occurred, so you see the error message you expected.
FIGURE 10-3: The exception handlers are in the wrong order.
FIGURE 10-4: Generic exception handling traps the KeyboardInterrupt exception.
Working with exception arguments
Most exceptions don't provide arguments (a list of values that you can check for additional information). The exception either occurs or it doesn’t. However, a few exceptions do provide arguments, and you see