cslerror.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /* cslerror.h Copyright (C) 1989-95 Codemist Ltd */
  2. /*
  3. * Error codes and functions.
  4. *
  5. */
  6. /* Signature: 25c2b493 05-Jun-1997 */
  7. #ifndef header_cslerror_h
  8. #define header_cslerror_h 1
  9. extern Lisp_Object interrupted(Lisp_Object p);
  10. extern Lisp_Object MS_CDECL error(int nargs, int code, ...);
  11. extern Lisp_Object MS_CDECL cerror(int nargs, int code1, int code2, ...);
  12. extern Lisp_Object too_few_2(Lisp_Object env, Lisp_Object a1);
  13. extern Lisp_Object too_many_1(Lisp_Object env, Lisp_Object a1, Lisp_Object a2);
  14. extern Lisp_Object wrong_no_0a(Lisp_Object env, Lisp_Object a1);
  15. extern Lisp_Object wrong_no_0b(Lisp_Object env, Lisp_Object a1, Lisp_Object a2);
  16. extern Lisp_Object wrong_no_3a(Lisp_Object env, Lisp_Object a1);
  17. extern Lisp_Object wrong_no_3b(Lisp_Object env, Lisp_Object a1, Lisp_Object a2);
  18. extern Lisp_Object wrong_no_na(Lisp_Object env, Lisp_Object a1);
  19. extern Lisp_Object wrong_no_nb(Lisp_Object env, Lisp_Object a1, Lisp_Object a2);
  20. extern Lisp_Object MS_CDECL wrong_no_1(Lisp_Object env, int nargs, ...);
  21. extern Lisp_Object MS_CDECL wrong_no_2(Lisp_Object env, int nargs, ...);
  22. extern Lisp_Object bad_special2(Lisp_Object env, Lisp_Object a1, Lisp_Object a2);
  23. extern Lisp_Object MS_CDECL bad_specialn(Lisp_Object env, int nargs, ...);
  24. extern Lisp_Object aerror(char *s); /* Called from C not Lisp */
  25. extern Lisp_Object aerror0(char *s);
  26. extern Lisp_Object aerror1(char *s, Lisp_Object a);
  27. extern Lisp_Object aerror2(char *s, Lisp_Object a, Lisp_Object b);
  28. extern void MS_CDECL fatal_error(int code, ...);
  29. #define GC_MESSAGES 0x01
  30. #define FASL_MESSAGES 0x02
  31. #define VERBOSE_MSGS 0x04
  32. #define GC_MSG_BITS 0x07
  33. #define HEADLINE_FLAG 0x08
  34. #define MESSAGES_FLAG 0x10
  35. #define verbos_flag (miscflags & GC_MSG_BITS)
  36. /*
  37. * It is essential that the #define values set up here are kept in
  38. * step with the textual error messages in the array that follows...
  39. */
  40. #define err_bad_car 0 /* + the atom */
  41. #define err_bad_cdr 1 /* + the atom */
  42. #define err_no_store 2 /* no extras */
  43. #define err_undefined_function_1 3 /* + fn name */
  44. #define err_undefined_function_2 4 /* + fn name */
  45. #define err_undefined_function_n 5 /* + fn name */
  46. #define err_wrong_no_args 6 /* fn name, actual arg count */
  47. #define err_unbound_lexical 7 /* + name */
  48. #define err_bad_rplac 8 /* + atom */
  49. #define err_bad_arith 9 /* + bad value */
  50. #define err_redef_special 10 /* + name */
  51. #define err_bad_arg 11 /* + offending value */
  52. #define err_bad_declare 12 /* + offending value */
  53. #define err_bad_fn 13 /* + offending value */
  54. #define err_unset_var 14 /* + name */
  55. #define err_too_many_args1 15 /* no extras */
  56. #define err_too_many_args2 16 /* no extras */
  57. #define err_bad_apply 17 /* + bad thing */
  58. #define err_macroex_hook 18 /* what it is */
  59. #define err_block_tag 19 /* bad tag */
  60. #define err_go_tag 20 /* bad tag */
  61. #define err_excess_args 21
  62. #define err_insufficient_args 22
  63. #define err_bad_bvl 23 /* + offending value */
  64. #define err_bad_keyargs 24
  65. #define err_write_err 25
  66. #define err_bad_endp 26 /* + the non-null atom */
  67. #define err_no_fasldir 27
  68. #define err_no_fasl 28 /* plus module name */
  69. #define err_open_failed 29 /* plus file name */
  70. #define err_pipe_failed 30 /* plus command for execution */
  71. #define err_stack_overflow 31
  72. #define err_top_bit 32
  73. #define err_mem_spans_zero 33
  74. #define err_registration 34
  75. #ifdef INCLUDE_ERROR_STRING_TABLE
  76. static char *error_message_table[] =
  77. {
  78. "attempt to take car of an atom",
  79. "attempt to take cdr of an atom",
  80. "insufficient freestore to run this package",
  81. "undefined function (1 arg)",
  82. "undefined function (2 args)",
  83. "undefined function",
  84. "wrong number of arguments",
  85. "unbound lexical variable",
  86. "bad rplaca/rplacd",
  87. "bad argument for an arithmetic function",
  88. "attempt to redefine a special form",
  89. "not a variable",
  90. "bad use of declare",
  91. "attempt to apply non-function",
  92. "unset variable",
  93. "too many arguments",
  94. "too many arguments",
  95. "object not valid as a function (apply,",
  96. "macroexpand-hook failure",
  97. "block tag not found",
  98. "go tag not found",
  99. "too many arguments provided",
  100. "not enough arguments provided",
  101. "bad item in bound variable list",
  102. "bad keyword arguments",
  103. "write-error on file",
  104. "endp used on badly terminated list",
  105. "environment parameter 'fasldir' not set",
  106. "loadable module not found for loading",
  107. "file could not be opened",
  108. "unable to establish pipe",
  109. "stack overflow",
  110. "top bit of address has unexpected value",
  111. "memory block spans the zero address",
  112. "registration code corrupt or invalid",
  113. "dummy final error message"
  114. };
  115. #endif
  116. #endif /* header_cslerror_h */
  117. /* end of cslerror.h */