On Jun 26, 7:46 am, Wildam Martin <[email protected]> wrote:
> On Fri, Jun 25, 2010 at 20:25, Reinier Zwitserloot <[email protected]> wrote:
> > I just don't get IDEs. Eclipse does something similar
> > (e.printStackTrace() I believe). This, AND what netbeans does, is
> > completely ridiculous. Almost always the wrong thing. The only obvious
> > thing to do when automatically generating an exception handler, is
> > this:
>
> > catch (CheckedEx e) {
> >    throw new RuntimeException("missing handler", e);
> > }
>
> Uhhhh - I would never ever do this.


I think you missed the point. I don't think Reinier was advocating
always rethrowing exceptions as RuntimeException, just that that's the
logic that IDEs should autogenerate. I'd much rather have eclipse
generate (by default)

catch (CheckedEx e) {
    // TODO add handling logic
    throw new RuntimeException("missing handler", e);
}

than

catch (CheckedEx e) {
    // TODO add handling logic
}

Obviously you need to fix the handling, but if (as is inevitable)
someone forgets, you're much better off with the first form than the
second.

-- 
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.

Reply via email to