1 /** 2 Mirror _errcode.h 3 4 Error codes passed around between file input, tokenizer, parser and 5 interpreter. This is necessary so we can turn them into Python 6 exceptions at a higher level. Note that some errors have a 7 slightly different meaning when passed from the tokenizer to the 8 parser than when passed from the parser to the interpreter; e.g. 9 the parser only returns E_EOF when it hits EOF immediately, and it 10 never returns E_OK. */ 11 module deimos.python.errcode; 12 /** No error */ 13 enum E_OK = 10; 14 /** End Of File */ 15 enum E_EOF = 11; 16 /** Interrupted */ 17 enum E_INTR = 12; 18 /** Bad token */ 19 enum E_TOKEN = 13; 20 /** Syntax error */ 21 enum E_SYNTAX = 14; 22 /** Ran out of memory */ 23 enum E_NOMEM = 15; 24 /** Parsing complete */ 25 enum E_DONE = 16; 26 /** Execution error */ 27 enum E_ERROR = 17; 28 /** Inconsistent mixing of tabs and spaces */ 29 enum E_TABSPACE = 18; 30 /** Node had too many children */ 31 enum E_OVERFLOW = 19; 32 /** Too many indentation levels */ 33 enum E_TOODEEP = 20; 34 /** No matching outer block for dedent */ 35 enum E_DEDENT = 21; 36 /** Error in decoding into Unicode */ 37 enum E_DECODE = 22; 38 /** EOF in triple-quoted string */ 39 enum E_EOFS = 23; 40 /** EOL in single-quoted string */ 41 enum E_EOLS = 24; 42 /** Unexpected characters after a line continuation */ 43 enum E_LINECONT = 25; 44 version(Python_3_0_Or_Later) { 45 /// Availability: >= 3.0 46 enum E_IDENTIFIER = 26; 47 }