RAII and Exception Safety

Why is RAII considered the foundation of exception-safe C++ code?