JsonCpp project page JsonCpp home page

Macros
assertions.h File Reference
#include <stdlib.h>
#include "config.h"
#include <stdexcept>

Go to the source code of this file.

Macros

#define JSON_ASSERT(condition)   assert(condition);
 
#define JSON_FAIL_MESSAGE(message)   throw std::runtime_error(message);
 
#define JSON_ASSERT_MESSAGE(condition, message)
 

Macro Definition Documentation

◆ JSON_ASSERT

#define JSON_ASSERT (   condition)    assert(condition);

Definition at line 17 of file assertions.h.

◆ JSON_ASSERT_MESSAGE

#define JSON_ASSERT_MESSAGE (   condition,
  message 
)
Value:
if (!(condition)) { \
JSON_FAIL_MESSAGE(message) \
}

Definition at line 36 of file assertions.h.

◆ JSON_FAIL_MESSAGE

#define JSON_FAIL_MESSAGE (   message)    throw std::runtime_error(message);

Definition at line 19 of file assertions.h.