Page 336 -
P. 336
exceptions and message boxes
Test Drive
Let’s see if the code works. Make sure the deliveries.txt file is read- Note: make sure
only. Then run the new version of the program in IDLE and try to record a deliveries.txt is
delivery by clicking on the Save button. set to read-only.
Clicking “Save"
causes the
title bar to deliveries.txt
change, due to
the error.
Click!
Sure enough, when you try to save the delivery details, the program catches the
exception and the exception handler displays the error message in the window
title.
Wonder what the people at Head-Ex will think of this?
you are here 4 301