Tag: exception safety
4 posts
-
C++ RAII Explained | Why Constructors and Destructors Prevent Leaks
A deep dive into C++ RAII grounded in a real production connection-leak incident, covering exception safety, the C++ Core Guidelines, and composable ownership.
-
C++ Exception Safety — Basic, Strong, and Nothrow Guarantees
C++ exception safety: basic, strong, and nothrow guarantees, RAII, copy-and-swap, destructor rules, and common pitfalls—with concise examples.
-
C++ noexcept Specifier: Contracts, Moves, and std::terminate
How noexcept actually changes program behavior: why a violated noexcept promise skips exception handling entirely and calls std::terminate, and why vector silently falls back to copying without a noexcept move constructor.
-
C++ Exceptions Done Right: Catch by Reference, Safety Guarantees, RAII and noexcept
Handle C++ exceptions safely: catch by const reference, basic/strong/nothrow guarantees, RAII cleanup, noexcept on moves, and when to use std::expected.