Well, I appologize for the side track. To be honest, part of the reason for even bringing up the isue was that there has been a lot of debate about it, but most of the complaints against were based upon developers misusing it, which I thought wasn't necessarily a good reason for complaint (more of an educational opportunity). I don't really care to convince anyone, as everyone's experience is a little different, and situational uses tend to be unprovable and uninteresting (from a pure "good" versus "bad" perspective).

But, to answer your real question, let me complete that example with an explanation. The reason why I wouldn't catch a more general exception (java.lang.Exception) is that it's caught somewhere else (and not by my code). I think there is a difference between the two, even to the user.

First, I may not necessarily need to do anything other than display a pretty message to the user for an application exception (now, I'm going to go off the deep end here and get myself into trouble, but it's even interesting, to me, to have validation checks throw exceptions that get displayed to the user through that method). It may not even log (in some cases, it should...as usual, depending). And there's certainly no need for a full stack trace in the log.

For the more general exception (meaning, an unchecked exception or such, like java.lang.Exception), the container (in the example, that would be the web container) would ultimately catch the exception, log to a specific error log, dump the stack trace, etc. It would also display a different kind of error message. Why? First, because it really is a different kind of error. If it's a null pointer exception, there's no pretty way to tell the user that they're staring at a bug. Instead, you display a big general "Yikes!" message and send the user somewhere, as opposed to redisplaying the same page with a couple of error messages or something. I know this may sound stupid, but you want the user to complain about those big ones so that they will get fixed (this is the old issue of: I don't have time to fix it, but if the user screams loud enough, my manager will make the time).

Anyway, if you, ultimately, consider them to be the same basic thing, then, yes, you can catch the more general exception and the checked exceptions will probably get in the way.

Dan