Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changed to Applicability and made a reference clickable

...

Code Block
bgColor#ccccff
public class StackUnderflowException extends Exception {
  StackUnderflowException () {
    super();
  }
  StackUnderflowException (String msg) {
    super(msg);
  }
}

// ...

try {
    doSomething();
} catch(StackUnderflowException sue) {
  // ...
} catch(TimeoutException te) {
  // ...
} catch(SecurityException se) {
  // ...
} catch(Exception e) {
  // ...
  throw e;
}

...

Applicability

Exceptions are used to handle exceptional conditions. If an exception is not caught, the program will be terminated. An exception that is incorrectly caught or is caught at the wrong level of recovery will likely cause incorrect behavior.

Guideline

Severity

Likelihood

Remediation Cost

Priority

Level

ERR51-JG

low

probable

medium

P4

L3

Automated Detection

Automated detection is not feasible.

Related Vulnerabilities

C++ Secure Coding Standard: ERR08-CPP. Prefer special-purpose types for exceptions

Bibliography

[JLS 2011] Chapter 11, ExceptionsImage Removed Image Removed Image Removed