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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
format_context_base::add_error

Adds an error to the current error state.

Synopsis
void
add_error(
    error_code ec);
Description

This function can be used by custom formatters to report that they received a value that can't be formatted. For instance, it's used by the built-in string formatter when a string with an invalid encoding is supplied.

If the error state is not set before calling this function, the error state is updated to ec. Otherwise, the error is ignored. This implies that once the error state is set, it can't be reset.

Exception safety

No-throw guarantee.


PrevUpHomeNext