mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
Kernel: Make KBufferBuilder::append() & friends return KResult
This allows callers to react to a failed append (due to OOM.)
This commit is contained in:
parent
b096e85777
commit
2065ced8f6
7 changed files with 63 additions and 42 deletions
|
@ -184,7 +184,8 @@ protected:
|
|||
}
|
||||
virtual bool output(KBufferBuilder& builder) override
|
||||
{
|
||||
builder.appendff("{}\n", value());
|
||||
if (builder.appendff("{}\n", value()).is_error())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue