Use stream error flags instead of exception

The operator>> overload should use stream error flags instead
of throwing an exception for error handling.
This commit is contained in:
Joel Johnson 2020-02-19 09:23:53 -07:00
parent 3beb37ea14
commit 52c3587c8e

View File

@ -1973,7 +1973,7 @@ IStream& operator>>(IStream& sin, Value& root) {
String errs;
bool ok = parseFromStream(b, sin, &root, &errs);
if (!ok) {
throwRuntimeError(errs);
sin.setstate(std::ios::failbit);
}
return sin;
}