Exception Safety A piece of code can be exception unsafe, neutral, or safe. Exception neutral code passes back all exceptions to the caller. Exception safe code works correctly when exceptions occur and does not leak resources or leave invalid object fragments. There is also basic, strong and no-throw exception safe safety guarantees. The state of variables or class instances are valid and useable.
Exception safety is a design consideration.
It must be built in, not added as an afterthought. Separate out memory allocation from object construction and destruction. Is Initialization idiom to isolate resource allocation and management. Before Release idiom to ensure that resource is not leaked. For basic data types like int and pointer, this is always the case.