Go to the documentation of this file.
6 #ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
7 #define CPPTL_JSON_ASSERTIONS_H_INCLUDED
12 #if !defined(JSON_IS_AMALGAMATION)
14 #endif // if !defined(JSON_IS_AMALGAMATION)
20 #if JSON_USE_EXCEPTION
23 #define JSON_ASSERT(condition) \
26 Json::throwLogicError("assert json failed"); \
30 #define JSON_FAIL_MESSAGE(message) \
34 Json::throwLogicError(oss.str()); \
38 #else // JSON_USE_EXCEPTION
40 #define JSON_ASSERT(condition) assert(condition)
44 #define JSON_FAIL_MESSAGE(message) \
48 assert(false && oss.str().c_str()); \
54 #define JSON_ASSERT_MESSAGE(condition, message) \
56 JSON_FAIL_MESSAGE(message); \
59 #endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED