On Mar 5, 4:20 pm, Tanya Dina Ruttenberg <[email protected]>
wrote:
> Why do you get an "already been caught" exception when you place 
> MyChildException before MyParentException?  The exercise doesn't explain why 
> you get this.try {            throw new MyChildException();} catch 
> (MyParentException e) {            System.err.println("Caught 
> MyParentException");} catch (MyChildException e) {   // Compile error 
> expected            System.err.println("Caught MyChildtException");}
> TDR

See the pre-reading material, (study the graphics and comments):

http://java.sun.com/docs/books/tutorial/essential/exceptions/definition.html

and take into account that ChildException extends ParentException.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to