AlgoMaster Logo

Standard Exceptions (std::exception hierarchy)

Last Updated: May 22, 2026

Medium Priority
10 min read

The C++ standard library ships with a small family of exception classes rooted at std::exception. Throwing one of these instead of a raw int or a hand-rolled string gives every catch site a single, predictable interface: a what() method that returns a description. The hierarchy also splits problems into two useful categories: bugs that could have been caught earlier, and failures that depend on the world outside the code.

Premium Content

Subscribe to unlock full access to this content and more premium articles.