Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Renamed.

...

Code that provides no exception safety guarantee is unsafe and must be considered defective.

Non-Compliant Code Example

TO DO

Code Block
bgColor#FFcccc

Compliant Solution

TO DO

Code Block
bgColor#ccccff

Risk Assessment

Code that is not exception safe typically leads to resource leaks, causes the program to be left in an inconsistent or unexpected state, and ultimately results in undefined behavior at some point after the first exception is thrown.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

ERR39-CPP

3 (high)

3 (likely)

3 (high)

P27

L1

Other Languages

TO DO

Bibliography

Wiki Markup
\[[CWE|AA. Bibliography#CWE]\] [CWE-390|http://cwe.mitre.org/data/definitions/390.html]: Detection of Error Condition Without Action
\[CWE\] [CWE-460|http://cwe.mitre.org/data/definitions/460.html]: Improper Cleanup on Thrown Exception
\[CWE\] [CWE-703|http://cwe.mitre.org/data/definitions/703.html]: Failure to Handle Exceptional Conditions
\[CWE\] [CWE-754|http://cwe.mitre.org/data/definitions/754.html]: Improper Check for Unusual or Exceptional Conditions
\[CWE\] [CWE-755|http://cwe.mitre.org/data/definitions/755.html]: Improper Handling of Exceptional Conditions
\[[ISO/IEC 14882-2003|AA. Bibliography#ISO/IEC 14882-2003]\]
\[[MISRA 08|AA. Bibliography#MISRA 08]\] Rule 15-3-2, 15-3-4
\[[Sutter 00|AA. Bibliography#Sutter 00]\] Sutter, Herb. _Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions_
\[[Sutter 01|AA. Bibliography#Sutter 01]\] Sutter, Herb. _More Exceptional C++: 40 New Engineering Puzzles, Programming Problems, and Solutions_

...