mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 07:14:45 +02:00
Made JSON_USE_EXCEPTION's value in config.h a default that can be overridden.
This allows users to override it with their compiler invocation. For example: g++ -D JSON_USE_EXCEPTION=0 ...
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
# include <json/config.h>
|
||||
#endif // if !defined(JSON_IS_AMALGAMATION)
|
||||
|
||||
#if defined(JSON_USE_EXCEPTION)
|
||||
#if JSON_USE_EXCEPTION
|
||||
#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
|
||||
#define JSON_FAIL_MESSAGE( message ) throw std::runtime_error( message );
|
||||
#else // defined(JSON_USE_EXCEPTION)
|
||||
#else // JSON_USE_EXCEPTION
|
||||
#define JSON_ASSERT( condition ) assert( condition );
|
||||
#define JSON_FAIL_MESSAGE( message ) { std::cerr << std::endl << message << std::endl; exit(123); }
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user