We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f164288 + 09b8670 commit 1522e4dCopy full SHA for 1522e4d
include/json/assertions.h
@@ -16,7 +16,7 @@
16
#if JSON_USE_EXCEPTION
17
#include <stdexcept>
18
#define JSON_ASSERT(condition) \
19
- assert(condition); // @todo <= change this into an exception throw
+ if (!(condition)) {throw std::runtime_error( "assert json failed" );} // @todo <= add detail about condition in exception
20
#define JSON_FAIL_MESSAGE(message) do{std::ostringstream oss; oss << message; throw std::runtime_error(oss.str());}while(0)
21
//#define JSON_FAIL_MESSAGE(message) throw std::runtime_error(message)
22
#else // JSON_USE_EXCEPTION
0 commit comments