The library implements the two-category error model described above with a set of classes. These classes are defined in the stdexcept header file. They can be used to catch exceptions thrown by the library and to throw exceptions from your own code.
The classes are related through inheritance. The inheritance hierarchy looks like this:
exception logic_error domain_error invalid_argument length_error out_of_range runtime_error range_error overflow_error
Classes logic_error and runtime_error inherit from class exception. All other exception classes inherit from either logic_error or runtime_error.