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

PrevUpHomeNext

is_fatal_error

Checks whether an error requires re-connection.

Synopsis

Defined in header <boost/mysql/is_fatal_error.hpp>

bool
is_fatal_error(
    error_code ec);
Description

After an operation on an established connection (like executing a query) fails, the connection may be usable for further operations (if the error was non-fatal) or not (if the error was fatal). This function determines whether an error code returned by a connection operation is fatal or not.

To recover from a fatal error code, close and re-establish the connection.

Exception safety

No-throw guarantee.


PrevUpHomeNext