Diagnostics library
From cppreference.com
< cpp
C++
Feature test macros (C++20)
Concepts library (C++20)
Diagnostics library
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Diagnostics library
(until C++20*)
(C++17)(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Exception handling failures
(C++11)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)
(TM TS)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++26)
(C++26)
(C++26)
Contents
[edit] Exception handling
The header <exception> provides several classes and functions related to exception handling in C++ programs.
Defined in header
<exception>
Capture and storage of exception objects
Handling of failures in exception handling
Defined in header
<exception>
Handling of exception specification violations (until C++17)
(deprecated in C++11)(removed in C++17)
(function) [edit]
(deprecated in C++11)(removed in C++17)
(typedef) [edit]
(deprecated in C++11)(removed in C++17)
(function) [edit]
[edit] Exception categories
Several convenience classes are predefined in the header <stdexcept>
to report particular error conditions. These classes can be divided into two categories: logic errors and runtime errors. Logic errors are a consequence of faulty logic within the program and may be preventable. Runtime errors are due to events beyond the scope of the program and cannot easily be predicted.
Defined in header
<stdexcept>
[edit] Error numbers
Defined in header
<cerrno>
[edit] System error (since C++11)
The header <system_error>
defines types and functions used to report error conditions originating from the operating system, streams I/O, std::future , or other low-level APIs.
Defined in header
<system_error>
(C++11)
(class) [edit]
[edit] Assertions
Assertions help to implement checking of preconditions in programs.
Defined in header
<cassert>
aborts the program if the user-specified condition is not true. May be disabled for release builds.
(function macro) [edit]
(function macro) [edit]
[edit] Stacktrace (since C++23)
Defined in header
<stacktrace>
(C++23)
(class template) [edit]
[edit] Debugging support (since C++26)
Defined in header
<debugging>
[edit] See also
C documentation for Error handling