[diagnostics.general]

# 19 Diagnostics library [[diagnostics]](./#diagnostics)

## 19.1 General [diagnostics.general]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L6)

This Clause describes components that C++ programs may use to detect and
report error conditions[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L10)

The following subclauses describe components for
reporting several kinds of exceptional conditions,
documenting program assertions,
obtaining stacktraces, and
a global variable for error number codes,
as summarized in Table [49](#tab:diagnostics.summary "Table 49: Diagnostics library summary")[.](#2.sentence-1)

Table [49](#tab:diagnostics.summary) — Diagnostics library summary [[tab:diagnostics.summary]](./tab:diagnostics.summary)  

| [ð](#tab:diagnostics.summary-row-1) | **Subclause** | **Header** |
| --- | --- | --- |
| [ð](#tab:diagnostics.summary-row-2)<br>[[std.exceptions]](std.exceptions "19.2 Exception classes") | Exception classes | <stdexcept> |
| [ð](#tab:diagnostics.summary-row-3)<br>[[assertions]](assertions "19.3 Assertions") | Assertions | <cassert> |
| [ð](#tab:diagnostics.summary-row-4)<br>[[errno]](errno "19.4 Error numbers") | Error numbers | <cerrno> |
| [ð](#tab:diagnostics.summary-row-5)<br>[[syserr]](syserr "19.5 System error support") | System error support | <system_error> |
| [ð](#tab:diagnostics.summary-row-6)<br>[[stacktrace]](stacktrace "19.6 Stacktrace") | Stacktrace | <stacktrace> |
| [ð](#tab:diagnostics.summary-row-7)<br>[[debugging]](debugging "19.7 Debugging") | Debugging | <debugging> |
