Whether you throw an exception or handle it in the method that caused it depends on the situation.
Why do some exceptions in API classes get thrown? Why do some get dealt with when they happen?
The web logic part may need to do something specific if a problem with the business logic occurs.
If a web server is creating a dynamic page and waiting for data from a database, but something goes wrong, does the "web logic" need to know about it? Probably. If you have everything decoupled so much, that every class or package or whatever is not dependent on anything but itself, how useful, maintainable and functional is it really going to be?
I think that Sun over did exceptions. There often caught exceptions where you never really care about them.
Just like it is possible and undesirable to have tightly coupled code, it is possible and undesirable to have too loosely coupled code. I think overusing
patterns can lead to this. Some people think everything must follow an established pattern, even if a simpler solution would be more appropriate.
There are benefits and trade offs to everything you will do in programming. There is no one right answer, you have to weigh the benefits against the trade-offs for every situation.
Be wary of one size fits all "solutions".
[ April 21, 2007: Message edited by: David McCombs ]