Standard library exception class hierarchy

The standard library exception class hierarchy provides a way to classify exceptions:

Logical errors refer to errors that should be caught or found through function parameter testing before the program is put into operation in principle.

All other errors are runtime errors.

About system_error:

In <system_error>, the standard library provides a framework for reporting errors from the operating system and underlying system components.

<system_error> also provides some components that can implement error code classification and map system-related error codes to

More portable code and mapping error codes to exceptions:

Please refer to Section 30.4.3 of "The C ++ Programming Language (Fourth Edition)-Bjarne Stroustrup" for more details.

Guess you like

Origin www.cnblogs.com/lhb666aboluo/p/12700409.html