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

This is the documentation for a snapshot of the develop branch, built from commit c5994560ca.

Function except_failure

boost::contract::except_failure — Call failure handler for exception guarantees.


// In header: <boost/contract/core/exception.hpp>

void except_failure(from where);


This is often called only internally by this library.

Throws: This can throw in case programmers specify a failure handler that throws exceptions on contract assertion failures (not the default), however:

[Warning] Warning

When this failure handler is called there is already an active exception (the one that caused the exception guarantees to be checked in the first place). Therefore, programming this failure handler to throw yet another exception will force C++ to automatically terminate the program.

See Also:

Throw on Failure, Exception Guarantees



Operation that failed the contract assertion.