The Result of Unhandled Exceptions
At this point, you might be wondering what would happen if you do not handle an exception
thrown your direction. Assume that the logic in Main() increases the speed of the Car object beyond
the maximum speed, without the benefit of try/catch logic. The result of ignoring an exception
would be highly obstructive to the end user of your application, as an “unhandled exception” dialog
box is displayed (see Figure 7-7).
C H A P T E R 7
■
U N D E R S TA N D I N G S T R U C T U R E D E X C E P T I O N H A N D L I N G
241
8849CH07.qxd 10/1/07 10:38 AM Page 241
Figure 7-7.
The result of not dealing with exceptions
Do'stlaringiz bilan baham: |