mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-16 07:23:43 +02:00
clarify errors
* use macros for logic errors, not input errors * throw on parsing failure in `operator>>()`, not assert * throw on malloc, not assert
This commit is contained in:
@@ -1994,7 +1994,7 @@ std::istream& operator>>(std::istream& sin, Value& root) {
|
||||
"Error from reader: %s",
|
||||
errs.c_str());
|
||||
|
||||
JSON_FAIL_MESSAGE("reader error");
|
||||
throw std::runtime_error("reader error");
|
||||
}
|
||||
return sin;
|
||||
}
|
||||
|
Reference in New Issue
Block a user