Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) std::exception

 

std::exception is the STL class for an exceptions.

 

std::exception is the base class of the STL exception hierarchy

 

Prefer to use a derived class of std::exception to a built-in type (like int) [1].

 

 

 

 

Examples

 

 

 

 

 

 

Reference

 

  1. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 13.7. Advice. page 386: '[4] Use purpose-designed user-defined types as exceptions (not built-in types)'

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict