Class mdbx::error
Implements error information and throwing corresponding exceptions.
#include <mdbx.h++>
Public Functions
| Type | Name |
|---|---|
| error (const error &) = default Copy constructor. |
|
| error (error &&) = default Move constructor. |
|
| ::std::string | message () const Returns message for any errors. |
| error & | operator= (const error &) = default Copy assignment operator. |
| error & | operator= (error &&) = default Move assignment operator. |
| void | throw_exception () const Panics on unrecoverable errors inside destructors etc. |
| const char * | what () noexcept const Returns message for MDBX's errors only and "SYSTEM" for others. |
Public Static Functions
| Type | Name |
|---|---|
| void | success_or_throw (int error_code) Throws the corresponding exception if the code is a failure. |
Public Functions Documentation
function error [1/2]
Copy constructor.
mdbx::error::error (
const error &
) = default
function error [2/2]
Move constructor.
mdbx::error::error (
error &&
) = default
function message
Returns message for any errors.
::std::string mdbx::error::message () const
Returns:
The error message as a std::string.
function operator=
Copy assignment operator.
error & mdbx::error::operator= (
const error &
) = default
Returns:
A reference to this instance.
function operator=
Move assignment operator.
error & mdbx::error::operator= (
error &&
) = default
Returns:
A reference to this instance.
function throw_exception
Panics on unrecoverable errors inside destructors etc.
void mdbx::error::throw_exception () const
Exception:
Thecorresponding mdbx::exception if the error is a failure.
function what
Returns message for MDBX's errors only and "SYSTEM" for others.
const char * mdbx::error::what () noexcept const
Returns:
The pointer to a constant string with the error message.
Public Static Functions Documentation
function success_or_throw
Throws the corresponding exception if the code is a failure.
static inline void mdbx::error::success_or_throw (
int error_code
)
Parameters:
error_codeThe error code to be checked.
Exception:
Thecorresponding mdbx::exception.
Friends Documentation
friend operator!=
Compares two error codes for inequality.
friend bool mdbx::error::operator!= (
const error & a,
const error & b
)
Parameters:
aThe left-hand error.bThe right-hand error.
Returns:
true if the error codes are not equal, false otherwise.
friend operator==
Compares two error codes for equality.
friend bool mdbx::error::operator== (
const error & a,
const error & b
)
Parameters:
aThe left-hand error.bThe right-hand error.
Returns:
true if the error codes are equal, false otherwise.
The documentation for this class was generated from the following file mdbx.h++