mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-18 03:29:46 +02:00
Re-add JSONCPP_NORETURN (#1041)
Fixes Visual Studio 2013 compatibility.
This commit is contained in:
@@ -207,13 +207,13 @@ Exception::~Exception() JSONCPP_NOEXCEPT {}
|
||||
char const* Exception::what() const JSONCPP_NOEXCEPT { return msg_.c_str(); }
|
||||
RuntimeError::RuntimeError(String const& msg) : Exception(msg) {}
|
||||
LogicError::LogicError(String const& msg) : Exception(msg) {}
|
||||
[[noreturn]] void throwRuntimeError(String const& msg) {
|
||||
JSONCPP_NORETURN void throwRuntimeError(String const& msg) {
|
||||
throw RuntimeError(msg);
|
||||
}
|
||||
[[noreturn]] void throwLogicError(String const& msg) { throw LogicError(msg); }
|
||||
JSONCPP_NORETURN void throwLogicError(String const& msg) { throw LogicError(msg); }
|
||||
#else // !JSON_USE_EXCEPTION
|
||||
[[noreturn]] void throwRuntimeError(String const& msg) { abort(); }
|
||||
[[noreturn]] void throwLogicError(String const& msg) { abort(); }
|
||||
JSONCPP_NORETURN void throwRuntimeError(String const& msg) { abort(); }
|
||||
JSONCPP_NORETURN void throwLogicError(String const& msg) { abort(); }
|
||||
#endif
|
||||
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user