home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 April / PCWorld_2001-04_cd.bin / Software / TemaCD / webclean / !!!python!!! / BeOpen-Python-2.0.exe / ERRCODE.H < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-01  |  1.1 KB  |  33 lines

  1. #ifndef Py_ERRCODE_H
  2. #define Py_ERRCODE_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7.  
  8. /* Error codes passed around between file input, tokenizer, parser and
  9.    interpreter.  This is necessary so we can turn them into Python
  10.    exceptions at a higher level.  Note that some errors have a
  11.    slightly different meaning when passed from the tokenizer to the
  12.    parser than when passed from the parser to the interpreter; e.g.
  13.    the parser only returns E_EOF when it hits EOF immediately, and it
  14.    never returns E_OK. */
  15.  
  16. #define E_OK        10    /* No error */
  17. #define E_EOF        11    /* End Of File */
  18. #define E_INTR        12    /* Interrupted */
  19. #define E_TOKEN        13    /* Bad token */
  20. #define E_SYNTAX    14    /* Syntax error */
  21. #define E_NOMEM        15    /* Ran out of memory */
  22. #define E_DONE        16    /* Parsing complete */
  23. #define E_ERROR        17    /* Execution error */
  24. #define E_TABSPACE    18    /* Inconsistent mixing of tabs and spaces */
  25. #define E_OVERFLOW      19    /* Node had too many children */
  26. #define E_TOODEEP    20    /* Too many indentation levels */
  27. #define E_DEDENT    21    /* No matching outer block for dedent */
  28.  
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif /* !Py_ERRCODE_H */
  33.