Idiot's Guides by Matt Telles

Idiot's Guides by Matt Telles

Author:Matt Telles
Language: eng
Format: epub
Publisher: DK Publishing
Published: 2014-08-05T04:00:00+00:00


Now, in programming, when you have a problem like this, there are two ways you can deal with it. You can handle the problem—in this case, an exception (I’ll talk about this more in the next section)—in your code. This is a good way to deal with, well, exceptional problems. On the other hand, you can handle the problem by preventing it from happening in the first place. The latter should always be your preferred approach.

So how do you change the program so it doesn’t crash? Well, that’s simple enough; Listing 12.2 shows you how.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.