From 3a2115bcdcfbca0432afad84f4877187f72514a2 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Fri, 1 Sep 2023 00:28:41 -0400 Subject: Make asserts from jsoncpp more descriptive --- json/jsoncpp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'json/jsoncpp.cpp') diff --git a/json/jsoncpp.cpp b/json/jsoncpp.cpp index 4154200b..307cf560 100644 --- a/json/jsoncpp.cpp +++ b/json/jsoncpp.cpp @@ -2653,9 +2653,10 @@ static inline void releaseStringValue(char* value, unsigned) { free(value); } namespace Json { -Exception::Exception(JSONCPP_STRING const& msg) : msg_(msg) {} +// BN: subclass +Exception::Exception(JSONCPP_STRING const& msg) : JSONCPP_EXCEPTION(msg) {} Exception::~Exception() JSONCPP_NOEXCEPT {} -char const* Exception::what() const JSONCPP_NOEXCEPT { return msg_.c_str(); } +// BN: removed what() RuntimeError::RuntimeError(JSONCPP_STRING const& msg) : Exception(msg) {} LogicError::LogicError(JSONCPP_STRING const& msg) : Exception(msg) {} JSONCPP_NORETURN void throwRuntimeError(JSONCPP_STRING const& msg) { -- cgit v1.3.1