diff options
Diffstat (limited to 'AK/Error.h')
-rw-r--r-- | AK/Error.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/AK/Error.h b/AK/Error.h index bb7315d8c8..302de1cf3c 100644 --- a/AK/Error.h +++ b/AK/Error.h @@ -38,12 +38,14 @@ public: return Error(syscall_name, rc); } [[nodiscard]] static Error from_string_view(StringView string_literal) { return Error(string_literal); } +#endif [[nodiscard]] static Error copy(Error const& error) { return Error(error); } +#ifndef KERNEL // NOTE: Prefer `from_string_literal` when directly typing out an error message: // // return Error::from_string_literal("Class: Some failure"); @@ -108,10 +110,12 @@ private: , m_syscall(true) { } +#endif Error(Error const&) = default; Error& operator=(Error const&) = default; +#ifndef KERNEL StringView m_string_literal; #endif |