1
Fork 0
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:
Andreas Kling 2021-09-06 18:24:13 +02:00
parent b096e85777
commit 2065ced8f6
7 changed files with 63 additions and 42 deletions

View file

@ -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;
}
};