Classes | |
class | mdbx::exception_thunk |
Transfers C++ exceptions thru C callbacks. More... | |
class | mdbx::error |
Implements error information and throwing corresponding exceptions. More... | |
class | mdbx::exception |
Base class for all libmdbx's exceptions that are corresponds to libmdbx errors. More... | |
class | mdbx::fatal |
Fatal exception that lead termination anyway in dangerous unrecoverable cases. More... | |
Macros | |
#define | MDBX_DECLARE_EXCEPTION(NAME) |
Functions | |
LIBMDBX_API void | mdbx::throw_too_small_target_buffer () |
LIBMDBX_API void | mdbx::throw_max_length_exceeded () |
LIBMDBX_API void | mdbx::throw_out_range () |
LIBMDBX_API void | mdbx::throw_allocators_mismatch () |
class mdbx::exception_thunk |
Transfers C++ exceptions thru C callbacks.
Implements saving exceptions before returning from an C++'s environment to the intermediate C code and re-throwing after returning from C to the C++'s environment.
Public Member Functions | |
exception_thunk () noexcept=default | |
exception_thunk (const exception_thunk &)=delete | |
exception_thunk (exception_thunk &&)=delete | |
exception_thunk & | operator= (const exception_thunk &)=delete |
exception_thunk & | operator= (exception_thunk &&)=delete |
bool | is_clean () const noexcept |
void | capture () noexcept |
void | rethrow_captured () const |
|
defaultnoexcept |
|
delete |
|
delete |
|
delete |
|
delete |
class mdbx::error |
Implements error information and throwing corresponding exceptions.
Public Member Functions | |
error (MDBX_error_t error_code) noexcept | |
error (const error &)=default | |
error (error &&)=default | |
error & | operator= (const error &)=default |
error & | operator= (error &&)=default |
bool | is_success () const noexcept |
bool | is_result_true () const noexcept |
bool | is_result_false () const noexcept |
bool | is_failure () const noexcept |
MDBX_error_t | code () const noexcept |
Returns error code. More... | |
const char * | what () const noexcept |
Returns message for MDBX's errors only and "SYSTEM" for others. More... | |
::std::string | message () const |
Returns message for any errors. More... | |
bool | is_mdbx_error () const noexcept |
Returns true for MDBX's errors. More... | |
void | panic (const char *context_where_when, const char *func_who_what) const noexcept |
Panics on unrecoverable errors inside destructors etc. More... | |
void | throw_exception () const |
void | throw_on_failure () const |
void | success_or_throw () const |
void | success_or_throw (const exception_thunk &) const |
void | panic_on_failure (const char *context_where, const char *func_who) const noexcept |
void | success_or_panic (const char *context_where, const char *func_who) const noexcept |
Static Public Member Functions | |
static void | throw_exception (int error_code) |
static void | throw_on_nullptr (const void *ptr, MDBX_error_t error_code) |
static void | success_or_throw (MDBX_error_t error_code) |
static void | success_or_throw (int error_code) |
static void | throw_on_failure (int error_code) |
static bool | boolean_or_throw (int error_code) |
static void | success_or_throw (int error_code, const exception_thunk &) |
static void | panic_on_failure (int error_code, const char *context_where, const char *func_who) noexcept |
static void | success_or_panic (int error_code, const char *context_where, const char *func_who) noexcept |
Friends | |
bool | operator== (const error &a, const error &b) noexcept |
bool | operator!= (const error &a, const error &b) noexcept |
|
default |
|
default |
::std::string mdbx::error::message | ( | ) | const |
Returns message for any errors.
|
noexcept |
Panics on unrecoverable errors inside destructors etc.
|
inlinestatic |
void mdbx::error::throw_exception | ( | ) | const |
|
noexcept |
Returns message for MDBX's errors only and "SYSTEM" for others.
class mdbx::exception |
Base class for all libmdbx's exceptions that are corresponds to libmdbx errors.
Inherits std::runtime_error.
Inherited by mdbx::fatal.
Public Member Functions | |
exception (const ::mdbx::error &) noexcept | |
exception (const exception &)=default | |
exception (exception &&)=default | |
virtual | ~exception () noexcept |
const ::mdbx::error | error () const noexcept |
|
noexcept |
|
default |
|
default |
|
virtualnoexcept |
|
inlinenoexcept |
class mdbx::fatal |
Fatal exception that lead termination anyway in dangerous unrecoverable cases.
Inherits mdbx::exception.
Public Member Functions | |
fatal (const ::mdbx::error &) noexcept | |
fatal (const exception &src) noexcept | |
fatal (exception &&src) noexcept | |
fatal (const fatal &src) noexcept | |
fatal (fatal &&src) noexcept | |
fatal & | operator= (fatal &&)=default |
fatal & | operator= (const fatal &)=default |
virtual | ~fatal () noexcept |
![]() | |
exception (const ::mdbx::error &) noexcept | |
exception (const exception &)=default | |
exception (exception &&)=default | |
virtual | ~exception () noexcept |
const ::mdbx::error | error () const noexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
virtualnoexcept |
#define MDBX_DECLARE_EXCEPTION | ( | NAME | ) |
LIBMDBX_API void mdbx::throw_allocators_mismatch | ( | ) |
LIBMDBX_API void mdbx::throw_max_length_exceeded | ( | ) |
LIBMDBX_API void mdbx::throw_out_range | ( | ) |
LIBMDBX_API void mdbx::throw_too_small_target_buffer | ( | ) |
mdbx::bad_map_id |
mdbx::bad_transaction |
mdbx::bad_value_size |
mdbx::db_corrupted |
mdbx::db_full |
mdbx::db_invalid |
mdbx::db_too_large |
mdbx::db_unable_extend |
mdbx::db_version_mismatch |
mdbx::db_wanna_write_for_recovery |
mdbx::incompatible_operation |
mdbx::internal_page_full |
mdbx::internal_problem |
mdbx::key_exists |
mdbx::key_mismatch |
mdbx::max_maps_reached |
mdbx::max_readers_reached |
mdbx::multivalue |
mdbx::no_data |
mdbx::not_found |
mdbx::operation_not_permitted |
mdbx::permission_denied_or_not_writeable |
mdbx::reader_slot_busy |
mdbx::remote_media |
mdbx::something_busy |
mdbx::thread_mismatch |
mdbx::transaction_full |
mdbx::transaction_overlapping |