1#ifndef JOEDB_DEBUG_ASSERT
8#define JOEDB_CHECK(x,e) do\
11 throw e(joedb::get_error_message(#x, __FILE__, __func__, __LINE__).c_str());\
16#if defined (NDEBUG) && !defined(JOEDB_FUZZING)
17#define JOEDB_DEBUG_ASSERT(x)
19#define JOEDB_DEBUG_ASSERT(x) JOEDB_CHECK(x, joedb::Assertion_Failure)
24#define JOEDB_RELEASE_ASSERT(x) JOEDB_CHECK(x, joedb::Release_Assertion_Failure)
30 const char *condition,
43 std::logic_error(what_arg)
Indicates a bug in the code, thrown by JOEDB_DEBUG_ASSERT when NDEBUG not defined.
Assertion_Failure(const char *what_arg)
std::string get_error_message(const char *condition, const char *full_file, const char *function, int line)