diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-29 10:48:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-29 10:48:12 +0200 |
| commit | 433bb5ef102b2bfa0049468be00d63011da8b973 (patch) | |
| tree | e0893a30710477045a5bb085cb7a27aada425c14 /dev/LibCompiler/ErrorOr.h | |
| parent | 1ddeab9a4426abd781a5066ba79af2ba64de11d9 (diff) | |
| parent | 756ee7f8dc954e27350fe5bdfbaa83b9f69780c8 (diff) | |
Merge pull request #6 from nekernel-org/dev
0.0.2e3
Diffstat (limited to 'dev/LibCompiler/ErrorOr.h')
| -rw-r--r-- | dev/LibCompiler/ErrorOr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dev/LibCompiler/ErrorOr.h b/dev/LibCompiler/ErrorOr.h index ca93dd2..77015b1 100644 --- a/dev/LibCompiler/ErrorOr.h +++ b/dev/LibCompiler/ErrorOr.h @@ -10,6 +10,7 @@ #pragma once #include <LibCompiler/Defines.h> +#include <LibCompiler/ErrorID.h> #include <LibCompiler/Ref.h> namespace LibCompiler { @@ -33,6 +34,10 @@ class ErrorOr final { Ref<T> Leak() { return mRef; } + Int32 Error() { return mId; } + + BOOL HasError() { return mId != LIBCOMPILER_SUCCESS; } + operator bool() { return mRef; } private: |
