mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:27:45 +00:00
AK: Make Error and ErrorOr<T> work in Lagom as well :^)
ErrnoCode is not a thing outside __serenity__, so let's not make assumptions about it existing.
This commit is contained in:
parent
6e255b262f
commit
202950bb01
2 changed files with 5 additions and 3 deletions
|
@ -56,10 +56,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
ErrorOr(ErrnoCode errno)
|
||||
: m_error(Error::from_errno(errno))
|
||||
#ifdef __serenity__
|
||||
ErrorOr(ErrnoCode code)
|
||||
: m_error(Error::from_errno(code))
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
ErrorOr(Error&& error)
|
||||
: m_error(move(error))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue