Skip to content

Commit 0c91927

Browse files
committed
assertions should be logic_error
1 parent 493f6dc commit 0c91927

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/json/assertions.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#if JSON_USE_EXCEPTION
1717
#include <stdexcept>
1818
#define JSON_ASSERT(condition) \
19-
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)
19+
if (!(condition)) {throw std::logic_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::logic_error(oss.str());}while(0)
21+
//#define JSON_FAIL_MESSAGE(message) throw std::logic_error(message)
2222
#else // JSON_USE_EXCEPTION
2323
#define JSON_ASSERT(condition) assert(condition);
2424

0 commit comments

Comments
 (0)