On 1 Aug 2009, at 08:00, Dominic Mitchell wrote:
> On 31 Jul 2009, at 15:14, Arulin of ACBL wrote:
>>              } catch (SQLException e) {
>>                      // TODO Auto-generated catch block
>>                      e.printStackTrace();
>>              }
>
> I hate Eclipse sometimes.

Sorry, rather than just emit snide comments, I should explain myself.   
I've been caught out on far too many occasions by people just leave  
the default eclipse[1] exception handler in place.  The problems are:

It gets written to the console (where it will probably be ignored).
The control flow continues as if nothing happened.  In my experience,  
this usually means you end up with null values where they're not  
expected, and quite likely you will see NullPointerExceptions further  
down the line.  If an exception has been thrown you probably want to  
be taking some corresponding action.

I wrote up how to change Eclipse to do something slightly more  
sensible: throw a RuntimeException.  Whilst that's not always what you  
want, it has the virtue of letting you know that something is broken  
immediately.

   http://happygiraffe.net/blog/2008/08/05/exceptional-eclipse-tip/

-Dom

[1] I think NetBeans produces something similar.
--~--~---------~--~----~------------~-------~--~----~
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