| Home | Libraries | People | FAQ | More

## Type from

boost::contract::from — Indicate the kind of operation where the contract assertion failed.

## Synopsis

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

    enum from { from_constructor, from_destructor, from_function };

## Description

This is passed as a parameter to the assertion failure handler functions. For example, it might be necessary to know in which operation an assertion failed to make sure exceptions are never thrown from destructors, not even when contract failure handlers are programmed by users to throw exceptions instead of terminating the program.

See Also:

Throw on Failure

`from_constructor`
  Assertion failed when checking contracts for constructors.
`from_destructor`
  Assertion failed when checking contracts for destructors .
`from_function`
  Assertion failed when checking contracts for functions (members or not, public or not).