mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibCore: Propagate errors from Stream::*_entire_buffer
This commit is contained in:
parent
6c7c5a6786
commit
9a3e95785e
17 changed files with 43 additions and 49 deletions
|
@ -79,13 +79,13 @@ public:
|
|||
m_offset += nwritten;
|
||||
return nwritten;
|
||||
}
|
||||
virtual bool write_entire_buffer(ReadonlyBytes bytes) override
|
||||
virtual ErrorOr<void> write_entire_buffer(ReadonlyBytes bytes) override
|
||||
{
|
||||
if (remaining() < bytes.size())
|
||||
return false;
|
||||
return Error::from_string_literal("Write of entire buffer ends past the memory area");
|
||||
|
||||
MUST(write(bytes));
|
||||
return true;
|
||||
TRY(write(bytes));
|
||||
return {};
|
||||
}
|
||||
|
||||
Bytes bytes()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue