File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313# include < json/config.h>
1414#endif // if !defined(JSON_IS_AMALGAMATION)
1515
16- #if defined( JSON_USE_EXCEPTION)
16+ #if JSON_USE_EXCEPTION
1717#define JSON_ASSERT ( condition ) assert ( condition ); // @todo <= change this into an exception throw
1818#define JSON_FAIL_MESSAGE ( message ) throw std::runtime_error ( message );
19- #else // defined( JSON_USE_EXCEPTION)
19+ #else // JSON_USE_EXCEPTION
2020#define JSON_ASSERT ( condition ) assert ( condition );
2121#define JSON_FAIL_MESSAGE ( message ) { std::cerr << std::endl << message << std::endl; exit (123 ); }
2222#endif
Original file line number Diff line number Diff line change 2424// / Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
2525// # define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
2626
27- // / If defined, indicates that Json use exception to report invalid type manipulation
28- // / instead of C assert macro.
27+ // If non-zero, the library uses exceptions to report bad input instead of C
28+ // assertion macros. The default is to use exceptions.
29+ # ifndef JSON_USE_EXCEPTION
2930# define JSON_USE_EXCEPTION 1
31+ # endif
3032
3133// / If defined, indicates that the source file is amalgated
3234// / to prevent private header inclusion.
You can’t perform that action at this time.
0 commit comments