zig/src/error.hpp

60 lines
1.3 KiB
C++
Raw Normal View History

2015-11-05 15:05:25 +08:00
/*
* Copyright (c) 2015 Andrew Kelley
*
* This file is part of zig, which is MIT licensed.
* See http://opensource.org/licenses/MIT
*/
#ifndef ERROR_HPP
#define ERROR_HPP
enum Error {
ErrorNone,
2015-11-05 15:05:25 +08:00
ErrorNoMem,
ErrorInvalidFormat,
ErrorSemanticAnalyzeFail,
2015-12-01 17:29:21 +08:00
ErrorAccess,
ErrorInterrupted,
ErrorSystemResources,
ErrorFileNotFound,
ErrorFileSystem,
ErrorFileTooBig,
ErrorDivByZero,
ErrorOverflow,
ErrorPathAlreadyExists,
ErrorUnexpected,
ErrorExactDivRemainder,
ErrorNegativeDenominator,
ErrorShiftedOutOneBits,
ErrorCCompileErrors,
2018-09-10 06:07:11 +08:00
ErrorEndOfFile,
ErrorIsDir,
ErrorNotDir,
ErrorUnsupportedOperatingSystem,
2018-09-12 23:33:26 +08:00
ErrorSharingViolation,
ErrorPipeBusy,
ErrorPrimitiveTypeNotFound,
ErrorCacheUnavailable,
ErrorPathTooLong,
ErrorCCompilerCannotFindFile,
ErrorReadingDepFile,
ErrorInvalidDepFile,
ErrorMissingArchitecture,
ErrorMissingOperatingSystem,
ErrorUnknownArchitecture,
ErrorUnknownOperatingSystem,
ErrorUnknownABI,
ErrorInvalidFilename,
ErrorDiskQuota,
ErrorDiskSpace,
ErrorUnexpectedWriteFailure,
ErrorUnexpectedSeekFailure,
ErrorUnexpectedFileTruncationFailure,
2015-11-05 15:05:25 +08:00
};
const char *err_str(Error err);
#define assertNoError(err) assert((err) == ErrorNone);
2015-11-05 15:05:25 +08:00
#endif