blob: caed95f6931a67cb6f8cf2341be3855707a5e849 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "error.hpp"
const char *err_str(int err) {
switch ((enum Error)err) {
case ErrorNone: return "(no error)";
case ErrorNoMem: return "out of memory";
case ErrorInvalidFormat: return "invalid format";
case ErrorSemanticAnalyzeFail: return "semantic analyze failed";
case ErrorAccess: return "access denied";
case ErrorInterrupted: return "interrupted";
case ErrorSystemResources: return "lack of system resources";
case ErrorFileNotFound: return "file not found";
case ErrorFileSystem: return "file system error";
case ErrorFileTooBig: return "file too big";
case ErrorDivByZero: return "division by zero";
case ErrorOverflow: return "overflow";
}
return "(invalid error)";
}
|