Programs encounter invalid input, unavailable resources, and violated assumptions. This chapter explains how C++ reports failures with exceptions, when an error code is a better fit, and how invariants, assertions, and noexcept help define a type’s and function’s guarantees.
Error Handling
Exceptions, invariants, assertions, and failure contracts