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);
}
That logger action just lets the process continue, while the state is
most likely corrupted. Horrible solution.
On Jun 25, 3:44 pm, Wildam Martin <[email protected]> wrote:
> Hi folks,
>
> did not test yet on NetBeans 3.9 (update has to wait until I have more
> time), NetBeans 3.8 and earlier do create the following on code
> completion for exception handling:
> try
> {
> blablabla...
> }
> catch (FileNotFoundException ex)
> {
> Logger.getLogger(Cls.class.getName()).log(Level.SEVERE, null, ex);
> }
>
> It generates the catch block and the Logger.getLogger(...) stuff.
>
> Now in the last news there was a short quotation of a logging line
> that (if I got it right) seemed somehow different.
> In much older versions of NetBeans the code completion was different
> (I think something like System.out.println(ex);).
> While I changed that proposal before, after some time I just accepted
> the Logger.getLogger(...) style - as it does the logging correct (and
> not just dumps it to console).
>
> Although I read on the internet that this should be ok, as I heard it
> differently (although I don't remember in detail) in the last
> newscast, I got unsure.
> Is the proposal of NetBeans ok here?
> And is it the same way in 3.9?
>
> Best wishes,
>
> Martin.
> --
> Martin Wildam
--
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.