mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
Streams: Distinguish recoverable and fatal errors.
This commit is contained in:
parent
daeb2bdc60
commit
9ce4475907
9 changed files with 75 additions and 59 deletions
|
@ -57,7 +57,7 @@ public:
|
|||
bool read_or_error(Bytes bytes) override
|
||||
{
|
||||
if (read(bytes) != bytes.size()) {
|
||||
m_error = true;
|
||||
set_fatal_error();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ public:
|
|||
if (m_bit_offset++ == 7)
|
||||
m_next_byte.clear();
|
||||
} else if (m_stream.eof()) {
|
||||
m_error = true;
|
||||
set_fatal_error();
|
||||
return 0;
|
||||
} else {
|
||||
m_stream >> m_next_byte;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue