notes-computer-programming-programmingLanguageDesign-prosAndCons-exceptionSafety

"

There are several levels of exception safety (in decreasing order of safety):[18]

    No-throw guarantee, also known as failure transparency: Operations are guaranteed to succeed and satisfy all requirements even in presence of exceptional situations. If an exception occurs, it will be handled internally and not observed by clients.
    Strong exception safety, also known as commit or rollback semantics: Operations can fail, but failed operations are guaranteed to have no side effects so all data retain original values.[19]
    Basic exception safety, also known as no-leak guarantee: Partial execution of failed operations can cause side effects, but all invariants are preserved and no resources are leaked. Any stored data will contain valid values, even if data has different values now from before the exception.
    No exception safety: No guarantees are made."

" Explicit use of empty exception specifications can, however, allow C++ compilers to perform significant code and stack layout optimizations that generally have to be suppressed when exception handling may take place in a function.[13] "