JsonCpp project page | JsonCpp home page |
#include <stdlib.h>
#include <sstream>
#include "config.h"
Go to the source code of this file.
Defines | |
#define | JSON_ASSERT(condition) assert(condition) |
It should not be possible for a maliciously designed file to cause an abort() or seg-fault, so these macros are used only for pre-condition violations and internal logic errors. | |
#define | JSON_FAIL_MESSAGE(message) |
#define | JSON_ASSERT_MESSAGE(condition, message) |
#define JSON_ASSERT | ( | condition | ) | assert(condition) |
It should not be possible for a maliciously designed file to cause an abort() or seg-fault, so these macros are used only for pre-condition violations and internal logic errors.
Definition at line 35 of file assertions.h.
#define JSON_ASSERT_MESSAGE | ( | condition, | |||
message | ) |
if (!(condition)) { \ JSON_FAIL_MESSAGE(message); \ }
Definition at line 49 of file assertions.h.
Referenced by Json::Value::asCString(), Json::Value::asInt(), Json::Value::asInt64(), Json::Value::asUInt(), Json::Value::asUInt64(), Json::Value::clear(), Json::duplicateAndPrefixStringValue(), Json::Value::find(), Json::Value::getMemberNames(), Json::Value::operator[](), Json::Value::removeMember(), and Json::Value::resize().
#define JSON_FAIL_MESSAGE | ( | message | ) |
{ \
std::ostringstream oss; oss << message; \
assert(false && oss.str().c_str()); \
abort(); \
}
Definition at line 39 of file assertions.h.
Referenced by Json::Value::asBool(), Json::Value::asDouble(), Json::Value::asFloat(), Json::Value::asInt(), Json::Value::asInt64(), Json::Value::asString(), Json::Value::asUInt(), and Json::Value::asUInt64().