Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Prev Up HomeNext

Review of Error Handling Frameworks

Outcome started life in 2014, entered Boost as Boost.Outcome in 2018, and therefore was amongst the very first of the major alternative error handling frameworks to standard exception throws in C++. Since then, and sometimes in reaction to Outcome’s choice of design, alternative frameworks have appeared. This page tries to give a fairly even handed summary of those alternatives, and how they compare to Outcome in this author’s opinion.

These are listed in order of approximate availability to the C++ ecosystem i.e. in order of appearance.

  1. std exception throws

    Advantages and disadvantages of C++ exception throws

  2. std error codes

    Advantages and disadvantages of std::error_code

  3. std expected

    Advantages and disadvantages of std::expected<T, E>

  4. Outcome (proposed std result)

    Advantages and disadvantages of Outcome and its proposed std::result<T>

  5. LEAF

    Advantages and disadvantages of Lightweight Error Augmentation Framework

My thanks to Emil Dotchevski for reviewing this summary and providing notes.

Last revised: January 10, 2022 at 14:29:13 UTC


Prev Up HomeNext