Skip to content

Glossary: C++ Basics

std::exception

Also written: std::invalid_argument, std::out_of_range, std::runtime_error, stdexcept

The standard exception classes from `<stdexcept>`: `invalid_argument` for a nonsensical value, `out_of_range` for a value outside its range, and `runtime_error` for a failure while running. All are kinds of `std::exception`, and `.what()` gives the message.

Where the book teaches it

Related terms

Exceptionthrowcatch