mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
LibIPC+IPCCompiler+AK: Make IPC value decoders return ErrorOr<void>
This allows us to use TRY() in decoding helpers, leading to a nice reduction in line count.
This commit is contained in:
parent
8d76eb773f
commit
cb9cac4e40
21 changed files with 207 additions and 296 deletions
|
@ -41,6 +41,13 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
ErrorOr<void> try_handle_any_error()
|
||||
{
|
||||
if (!handle_any_error())
|
||||
return {};
|
||||
return Error::from_string_literal("Stream error"sv);
|
||||
}
|
||||
|
||||
virtual void set_recoverable_error() const { m_recoverable_error = true; }
|
||||
virtual void set_fatal_error() const { m_fatal_error = true; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue