Well that's kind of where I'm coming from anyway. If I'm using an API that throws (un)checked exceptions that I can manage then I'd rather encapsulate handling it such that the dependencies are not presented with it. The things you really can't handle, well, it's game over. The debate about what to do when File.close() throws an exception applies regardless of the type of exception.
On Mar 24, 11:07 am, Josh Berry <[email protected]> wrote: > On Thu, Mar 24, 2011 at 5:16 AM, Phil <[email protected]> wrote: > > Personally I sit in the 'handle it immediately or wrap and throw' > > camp. Not least because the most realistic place to handle the > > exception is inside the method that it occurred. The further away from > > the exception the handling code resides, the harder it becomes to code > > a specific recovery action. > > I've found that the typical "most realistic place to handle" an > exception is to take it all the way back to a user or developer > somehow. Otherwise, it probably wasn't that exceptional. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. 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/javaposse?hl=en.
