mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 10:03:51 +01:00
Make throwRuntimeError/throwLogicError print msg when built with JSON_USE_EXCEPTION=0
This commit is contained in:
parent
5813ab1bc1
commit
91f1553f2c
@ -13,6 +13,7 @@
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
@ -211,8 +212,14 @@ JSONCPP_NORETURN void throwLogicError(String const& msg) {
|
||||
throw LogicError(msg);
|
||||
}
|
||||
#else // !JSON_USE_EXCEPTION
|
||||
JSONCPP_NORETURN void throwRuntimeError(String const& msg) { abort(); }
|
||||
JSONCPP_NORETURN void throwLogicError(String const& msg) { abort(); }
|
||||
JSONCPP_NORETURN void throwRuntimeError(String const& msg) {
|
||||
std::cerr << msg << std::endl;
|
||||
abort();
|
||||
}
|
||||
JSONCPP_NORETURN void throwLogicError(String const& msg) {
|
||||
std::cerr << msg << std::endl;
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user