Skip to content

Glossary: Algorithms Beyond the Basics in C++

catch block

Also written: try/catch, try, catch

C++ code that handles an exception thrown inside a `try` block, such as the `runtime_error` Kahn's algorithm throws on a cycle. `what()` returns the error message.

Where the book teaches it

Related terms

runtime_error