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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -