This week's giveaway is in the Beginning Java forum.
We're giving away four copies of Bad Programming Practices 101 (e-book) and have Karl Beecher on-line!
See this thread for details.
Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!

David Requena

Greenhorn
+ Follow
since Dec 15, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Requena

never mind...
it was me who was catching an exception where none was being thrown..
9 years ago
Hellow,

I have code like the folowing:


Person() constructor espcifies a "throws" clause for NonExistentNotesUserException which in turn is thrown by one of Person's methods calle by the constructor.

NonExistentNotesUserException inherits from DirectoryException.

The thing is: in case of NonExistentNotesUserException being thrown control allways passes to the outer catch caluse instead of the more specific inner one.

Could someone explain what is going on here, please? What would be a better way to acomplish my intent; which is log an error in case o processing a non existent user and proceed to process the next?

TIA
9 years ago