File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 13
13
# include < json/config.h>
14
14
#endif // if !defined(JSON_IS_AMALGAMATION)
15
15
16
- #if defined( JSON_USE_EXCEPTION)
16
+ #if JSON_USE_EXCEPTION
17
17
#define JSON_ASSERT ( condition ) assert( condition ); // @todo <= change this into an exception throw
18
18
#define JSON_FAIL_MESSAGE ( message ) throw std::runtime_error ( message );
19
- #else // defined( JSON_USE_EXCEPTION)
19
+ #else // JSON_USE_EXCEPTION
20
20
#define JSON_ASSERT ( condition ) assert( condition );
21
21
#define JSON_FAIL_MESSAGE ( message ) { std::cerr << std::endl << message << std::endl; exit (123 ); }
22
22
#endif
Original file line number Diff line number Diff line change 24
24
// / Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
25
25
// # define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
26
26
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
29
30
# define JSON_USE_EXCEPTION 1
31
+ # endif
30
32
31
33
// / If defined, indicates that the source file is amalgated
32
34
// / to prevent private header inclusion.
You can’t perform that action at this time.
0 commit comments