1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:27:45 +00:00

Streams: Distinguish recoverable and fatal errors.

This commit is contained in:
asynts 2020-08-31 13:12:15 +02:00 committed by Andreas Kling
parent daeb2bdc60
commit 9ce4475907
9 changed files with 75 additions and 59 deletions

View file

@ -288,8 +288,7 @@ inline InputStream& operator>>(InputStream& stream, String& string)
if (stream.eof()) {
string = nullptr;
// FIXME: We need an InputStream::set_error_flag method.
stream.discard_or_error(1);
stream.set_fatal_error();
return stream;
}