|
-
Sep 18th, 2006, 04:01 PM
#1
Thread Starter
Banned
[02/03] Exception parent child relationships
At the highest level of an exception we have the notorious Exception class..beneath that we have a wide array of classes such as IOException, IndexOutOf..Exception, etc etc.
What is the best way to find out what the first exception an object may throw, for instance is it just best to use the help documents and read on what the object might throw.
Meaning avoiding to have a try / catch / finally block with all the catches being of type Exception e...I would like to be able to throw the particular exception that my code has thrown. For instance, when dealing with File I/O
instead of the General Exception one can throw IOExceptions...
So how does one tell what exceptions specific objects throw that way we can handle them more appropriately ?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|