Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

It is highly unlikely that a method is built to deal with all possible runtime exceptions; consequently . Consequently, no method should ever catch RuntimeException. If a method catches RuntimeException, it may receive exceptions it was not designed to handle, such as NullPointerException. Many catch clauses simply log or ignore their error, and execution resumes. Runtime exceptions indicate bugs in the program that should be fixed by the developer. They almost always lead to control flow vulnerabilities.

...