mirror of
https://github.com/ziglang/zig.git
synced 2026-01-23 15:55:28 +00:00
* better message printed when cache hash fails * better handling of '/' as root source file * os_path_split parses '/' and '/a' correctly closes #1693 closes #1746
48 lines
927 B
C++
48 lines
927 B
C++
/*
|
|
* 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
|
|
|
|
#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,
|
|
ErrorUnsupportedOperatingSystem,
|
|
ErrorSharingViolation,
|
|
ErrorPipeBusy,
|
|
ErrorPrimitiveTypeNotFound,
|
|
ErrorCacheUnavailable,
|
|
};
|
|
|
|
const char *err_str(Error err);
|
|
|
|
static inline void assertNoError(Error err) {
|
|
assert(err == ErrorNone);
|
|
}
|
|
|
|
#endif
|