Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Classes | Namespaces | Macros
assert.h File Reference
#include <stdexcept>
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_ASSERT when NDEBUG not defined. More...
 

Namespaces

namespace  joedb
 

Macros

#define JOEDB_ASSERT_STRINGIFY(x)   #x
 
#define JOEDB_ASSERT_TO_STRING(x)   JOEDB_ASSERT_STRINGIFY(x)
 
#define JOEDB_CHECK(x, e)
 
#define JOEDB_ASSERT(x)   JOEDB_CHECK(x, joedb::Assertion_Failure)
 
#define JOEDB_RELEASE_ASSERT(x)   JOEDB_CHECK(x, joedb::Exception)
 

Macro Definition Documentation

◆ JOEDB_ASSERT_STRINGIFY

#define JOEDB_ASSERT_STRINGIFY (   x)    #x

Definition at line 5 of file assert.h.

◆ JOEDB_ASSERT_TO_STRING

#define JOEDB_ASSERT_TO_STRING (   x)    JOEDB_ASSERT_STRINGIFY(x)

Definition at line 6 of file assert.h.

◆ JOEDB_CHECK

#define JOEDB_CHECK (   x,
 
)
Value:
do\
{\
if (!(x))\
throw e("!("#x ")\n File: " __FILE__ "\n Line: " JOEDB_ASSERT_TO_STRING(__LINE__));\
} while(0)
#define JOEDB_ASSERT_TO_STRING(x)
Definition assert.h:6

Definition at line 7 of file assert.h.