Joedb 10.0.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Functions
assert.h File Reference
#include "joedb/error/Exception.h"
#include <stdexcept>
#include <string>
Include dependency graph for assert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  joedb::Assertion_Failure
 Indicates a bug in the code, thrown by JOEDB_DEBUG_ASSERT when NDEBUG not defined. More...
 

Namespaces

namespace  joedb
 

Macros

#define JOEDB_CHECK(x, e)
 
#define JOEDB_DEBUG_ASSERT(x)   JOEDB_CHECK(x, joedb::Assertion_Failure)
 assertion tested in debug mode
 
#define JOEDB_RELEASE_ASSERT(x)   JOEDB_CHECK(x, joedb::Release_Assertion_Failure)
 always-tested assertion (release and debug mode)
 

Typedefs

using joedb::Release_Assertion_Failure = Exception
 

Functions

std::string joedb::get_error_message (const char *condition, const char *full_file, const char *function, int line)
 

Macro Definition Documentation

◆ JOEDB_CHECK

#define JOEDB_CHECK (   x,
 
)
Value:
do\
{\
if (!(x))\
throw e(joedb::get_error_message(#x, __FILE__, __func__, __LINE__).c_str());\
} while(0)
std::string get_error_message(const char *condition, const char *full_file, const char *function, int line)
Definition assert.cpp:10

Definition at line 8 of file assert.h.