Eclipse - Handling Java Exceptions like in NetBeans -
i moved netbeans eclipse , miss 1 great feature - whenever use method throws kind of exception, netbeans alerted me , needed add try-catch , netbeans automatically generated exception type me. there similiar eclipse?
f.e. : integer.parseint(new string("foo"));
netbeans alerts need catch numberformatexception.
eclipse doesn't alert me @ all
i using eclipse java ee ide web developers, 3.5 - galileo
it does. have hit "save" (ctrl + s) before that, of course.
of course, shouldn't have declared method throw exception (for example throws exception)
also make sure have project > build automatically selected.
important: don't declare or catch runtimeexception or subclasses - these unchecked exceptions, , them eclipse rightly doesn't offer options. numberformatexceptions 1 of these.
try methods of fileinputstream, example, ioexception - checked exception - thrown.
(for record - netbeans doesn't integer.parseint(..))
Comments
Post a Comment