aboutsummaryrefslogtreecommitdiff
path: root/src/error.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.hpp')
-rw-r--r--src/error.hpp50
1 files changed, 2 insertions, 48 deletions
diff --git a/src/error.hpp b/src/error.hpp
index d943703268..3ff36e1a5f 100644
--- a/src/error.hpp
+++ b/src/error.hpp
@@ -8,56 +8,10 @@
#ifndef ERROR_HPP
#define ERROR_HPP
-#include <assert.h>
-
-enum Error {
- ErrorNone,
- ErrorNoMem,
- ErrorInvalidFormat,
- ErrorSemanticAnalyzeFail,
- ErrorAccess,
- ErrorInterrupted,
- ErrorSystemResources,
- ErrorFileNotFound,
- ErrorFileSystem,
- ErrorFileTooBig,
- ErrorDivByZero,
- ErrorOverflow,
- ErrorPathAlreadyExists,
- ErrorUnexpected,
- ErrorExactDivRemainder,
- ErrorNegativeDenominator,
- ErrorShiftedOutOneBits,
- ErrorCCompileErrors,
- ErrorEndOfFile,
- ErrorIsDir,
- ErrorNotDir,
- ErrorUnsupportedOperatingSystem,
- ErrorSharingViolation,
- ErrorPipeBusy,
- ErrorPrimitiveTypeNotFound,
- ErrorCacheUnavailable,
- ErrorPathTooLong,
- ErrorCCompilerCannotFindFile,
- ErrorReadingDepFile,
- ErrorInvalidDepFile,
- ErrorMissingArchitecture,
- ErrorMissingOperatingSystem,
- ErrorUnknownArchitecture,
- ErrorUnknownOperatingSystem,
- ErrorUnknownABI,
- ErrorInvalidFilename,
- ErrorDiskQuota,
- ErrorDiskSpace,
- ErrorUnexpectedWriteFailure,
- ErrorUnexpectedSeekFailure,
- ErrorUnexpectedFileTruncationFailure,
-};
+#include "userland.h"
const char *err_str(Error err);
-static inline void assertNoError(Error err) {
- assert(err == ErrorNone);
-}
+#define assertNoError(err) assert((err) == ErrorNone);
#endif