boost::openmethod::policies::default_error_handler :: Boost.OpenMethod

# boost::openmethod::policies::default_error_handler

Calls a std::function with the error.

## Synopsis

Declared in `<boost/openmethod/policies/default_error_handler.hpp>`

    struct default_error_handler
        : error_handler

## Description

Wraps the error in a `std::variant`, and calls a `std::function` with it. The function object is initialized to a function (`default_handler`) that writes a description of the error, using the `output` policy, if it is available in the registry.

This is the error handler used by the default registry. In debug variants, it writes an error message to `stderr`, then returns. In release variants, no message is emitted. Any call by the library to the error policy is immediately followed by a call to `abort`.

By default, the library is exception‐agnostic: it is exception‐safe, but it does not throw exceptions by itself. The program may replace the default handler with a function that throws an exception, possibly preventing program termination. The `throw_error_handler` policy can also be used to enable exception throwing on a registry basis.

## Base Classes

Name | Description
--- | ---
`error_handler` | Policy for error handling.

## Types

Name | Description
`fn` | A ErrorHandlerFn metafunction.

Created with MrDocs