| title |
<stdexcept> | Microsoft Docs |
| ms.custom |
|
| ms.date |
11/04/2016 |
| ms.reviewer |
|
| ms.suite |
|
| ms.technology |
|
| ms.tgt_pltfrm |
|
| ms.topic |
article |
| f1_keywords |
std.<stdexcept> |
std::<stdexcept> |
<stdexcept> |
|
| dev_langs |
|
| helpviewer_keywords |
|
| ms.assetid |
495c10b1-1e60-4514-9f8f-7fda11a2f522 |
| caps.latest.revision |
19 |
| author |
corob-msft |
| ms.author |
corob |
| manager |
ghogen |
| translation.priority.ht |
cs-cz |
de-de |
es-es |
fr-fr |
it-it |
ja-jp |
ko-kr |
pl-pl |
pt-br |
ru-ru |
tr-tr |
zh-cn |
zh-tw |
|
Defines several standard classes used for reporting exceptions. The classes form a derivation hierarchy all derived from class exception and include two general types of exceptions: logical errors and run-time errors. The logical errors are caused programmer mistakes. They derive from the base class logic_error and include:
-
domain_error
-
invalid_argument
-
length_error
-
out_of_range
The run-time errors occur because of mistakes in either the library functions or in the run-time system. They derive from the base class runtime_error and include:
-
overflow_error
-
range_error
-
underflow_error
|
|
| domain_error Class |
The class serves as the base class for all exceptions thrown to report a domain error. |
| invalid_argument Class |
The class serves as the base class for all exceptions thrown to report an invalid argument. |
| length_error Class |
The class serves as the base class for all exceptions thrown to report an attempt to generate an object too long to be specified. |
| logic_error Class |
The class serves as the base class for all exceptions thrown to report errors presumably detectable before the program executes, such as violations of logical preconditions. |
| out_of_range Class |
The class serves as the base class for all exceptions thrown to report an argument that is out of its valid range. |
| overflow_error Class |
The class serves as the base class for all exceptions thrown to report an arithmetic overflow. |
| range_error Class |
The class serves as the base class for all exceptions thrown to report a range error. |
| runtime_error Class |
The class serves as the base class for all exceptions thrown to report errors presumably detectable only when the program executes. |
| underflow_error Class |
The class serves as the base class for all exceptions thrown to report an arithmetic underflow. |
Header Files Reference
Thread Safety in the C++ Standard Library