21 kErrorNoPermission = 1,
23 kErrorProcessNotFound = 3,
24 kErrorInterrupted = 4,
25 kErrorInvalidHandle = 9,
27 kErrorAccessDenied = 13,
28 kErrorInvalidAddress = 14,
30 kErrorAlreadyExist = 17,
32 kErrorNotDirectory = 20,
33 kErrorIsDirectory = 21,
34 kErrorInvalidArgument = 22,
35 kErrorTooManySystemFiles = 23,
36 kErrorTooManyFiles = 24,
37 kErrorFileTooBig = 27,
39 kErrorInvalidSeek = 29,
40 kErrorNotWriteable = 30,
41 kErrorNameTooLong = 91,
43 kErrorUnsupported = 10000
46char const *GetErrorCodeString(ErrorCode err);
48#define CHK_ACTION(C, A) \
50 auto __CHK_expr_lambda = [&]() { return C; }; \
52 std::is_same<decltype(__CHK_expr_lambda()), ErrorCode>::value, \
53 #C " is not an expression of type ErrorCode"); \
54 ErrorCode CHK_error = (C); \
55 if (CHK_error != kSuccess) { \
61#define CHK(C) CHK_ACTION(C, return CHK_error)
62#define CHKV(C) CHK_ACTION(C, return )