Handle them? I have them serialized and jettisoned into space. One day an alien race will visit us and communicate with the NullPointerException.
On Aug 15, 11:05 am, Hannu Leinonen <hlein...@gmail.com> wrote: > Sure, working on reading it. For some reason I haven't read the > Exception chapter yet, but I'll take that one next. Thanks for the > suggestion! > > Eventhough I think at least some of my workmates have read that book, > still they don't seem to have that clear view about exceptions. > > -Hannu > > > > Casper Bang wrote: > > Are aware of the seminal book "Effective Java" by Joshua Bloch which > > devotes an entire chapter to Java exceptions? > > > /Casper > > > On 15 Aug., 02:31, Hannu Leinonen <hlein...@gmail.com> wrote: > >> Hello posse (of The Posse)! > > >> I've been lately discussing about exception handling in Java with my > >> workmates. And I've noticed that there's some uncertainty about > >> Exceptions and how to use them. Currently we're working on a quite > >> traditional three-tier Spring+Hibernate web app (using way too much of > >> that disgusting null programming, but that's another story). > > >> Personally I usually regard ... catch (Exception e) ... as a code smell > >> because it will catch - usually unintentionally - all RuntimeExceptions > >> too. Not to mention catching Throwable, like there was a lot we could do > >> with Errors. My current style is catching all checked exceptions on > >> their own blocks and catching RuntimeException on it's own block where > >> it makes sense (at least in controllers). But that sometimes makes the > >> code ugly with a dozen catch blocks doing exactly the same thing. AFAIK > >> Project Coin is going to fix this annoyance. Would it be better in a > >> situation where I anyways catch RuntimeException to use Exception as it > >> is the lowest common denominator? > > >> How do you make the most out of your Exceptions? And how do you do it in > >> multi-tier architecture? > > >> Best Regards, > >> Hannu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---