Skip to content

Glossary: Software Design Patterns in C++

exception

Also written: throw, try/catch, exceptions

A way to report an error by `throw`ing an object, which stops the function and is handled by a `catch` block around a `try`. `create_carrier("fedex")` throws `std::invalid_argument`.

Where the book teaches it