java - What's the configuration to notify the unhandled exceptions in Eclipse? -


when in eclipse use method throws exception, complains if not surrounded try/catch or if exception not thrown again. exceptions (e.g. integer.parseint(string)) eclipse won't complain.

how set eclipse complain not handled exceptions??

thanks!

the simple answer can't.

the longer answer is:

  • checked versus unchecked exceptions fundamental part of java language.

  • it not role of eclipse compiler give compilation errors or warnings valid , acceptable java.

  • you wouldn't want either, considering majority of statements (in theory) throw or propagate exceptions such nullpointerexception, arrayindexoutofboundsexception, outofmemoryerror, , on.

yes, there 1 or 2 "mistakes" ... such numberformatexception being unchecked exception ... better way deal (for example) run pmd custom rules pick exceptions "ought be" treated checked.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -