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:
parent
3beb37ea14
commit
52c3587c8e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user