aboutsummaryrefslogtreecommitdiff
path: root/src/error.cpp
blob: 7690dd07761370334f5f33b691c0b7fa44de6ae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#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";
    }
    return "(invalid error)";
}