First page Back Continue Last page Graphics
13.13 Standard Library Exception Hierarchy
Exception hierarchy
- Base class exception (<exception>)
- Virtual function what, overridden to provide error messages
- Sample derived classes
- runtime_error, logic_error
- bad_alloc, bad_cast, bad_typeid
- Thrown by new, dynamic_cast and typeid
To catch all exceptions
- catch(...)
- catch( exception AnyException)
- Will not catch user-defined exceptions