Skip to content

Commit

Permalink
Use stream error flags instead of exception
Browse files Browse the repository at this point in the history
The operator>> overload should use stream error flags instead
of throwing an exception for error handling.
  • Loading branch information
mrjoel committed Feb 19, 2020
1 parent 3beb37e commit 52c3587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib_json/json_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 52c3587

Please sign in to comment.