Skip to content

Commit

Permalink
assertions should be logic_error
Browse files Browse the repository at this point in the history
  • Loading branch information
cdunn2001 committed Mar 3, 2015
1 parent 493f6dc commit 0c91927
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/json/assertions.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#if JSON_USE_EXCEPTION
#include <stdexcept>
#define JSON_ASSERT(condition) \
if (!(condition)) {throw std::runtime_error( "assert json failed" );} // @todo <= add detail about condition in exception
#define JSON_FAIL_MESSAGE(message) do{std::ostringstream oss; oss << message; throw std::runtime_error(oss.str());}while(0)
//#define JSON_FAIL_MESSAGE(message) throw std::runtime_error(message)
if (!(condition)) {throw std::logic_error( "assert json failed" );} // @todo <= add detail about condition in exception
#define JSON_FAIL_MESSAGE(message) do{std::ostringstream oss; oss << message; throw std::logic_error(oss.str());}while(0)
//#define JSON_FAIL_MESSAGE(message) throw std::logic_error(message)
#else // JSON_USE_EXCEPTION
#define JSON_ASSERT(condition) assert(condition);

Expand Down

0 comments on commit 0c91927

Please sign in to comment.