factor/native/error.h

35 lines
1.1 KiB
C
Raw Normal View History

2004-09-21 22:58:54 -04:00
#define ERROR_EXPIRED (0<<3)
#define ERROR_IO_TASK_TWICE (1<<3)
#define ERROR_IO_TASK_NONE (2<<3)
#define ERROR_INCOMPATIBLE_PORT (3<<3)
#define ERROR_IO (4<<3)
#define ERROR_UNDEFINED_WORD (5<<3)
#define ERROR_TYPE (6<<3)
#define ERROR_RANGE (7<<3)
2004-09-19 00:33:40 -04:00
#define ERROR_FLOAT_FORMAT (8<<3)
#define ERROR_SIGNAL (9<<3)
2004-09-21 22:58:54 -04:00
#define ERROR_NEGATIVE_ARRAY_SIZE (10<<3)
#define ERROR_BAD_PRIMITIVE (11<<3)
#define ERROR_C_STRING (12<<3)
#define ERROR_FFI_DISABLED (13<<3)
#define ERROR_FFI (14<<3)
2004-11-09 12:29:25 -05:00
#define ERROR_CLOSED (15<<3)
2004-07-16 02:26:21 -04:00
2004-11-06 15:51:17 -05:00
/* When throw_error throws an error, it sets this global and
longjmps back to the top-level. */
CELL thrown_error;
2004-11-09 12:29:25 -05:00
CELL thrown_keep_stacks;
CELL thrown_ds;
CELL thrown_cs;
2004-11-06 15:51:17 -05:00
void init_errors(void);
2004-07-16 02:26:21 -04:00
void fatal_error(char* msg, CELL tagged);
2004-07-20 02:59:32 -04:00
void critical_error(char* msg, CELL tagged);
2004-11-09 12:29:25 -05:00
void throw_error(CELL error, bool keep_stacks);
void early_error(CELL error);
2004-07-16 02:26:21 -04:00
void general_error(CELL error, CELL tagged);
2004-11-09 12:29:25 -05:00
void signal_error(int signal);
2004-07-16 02:26:21 -04:00
void type_error(CELL type, CELL tagged);
void primitive_throw(void);
void range_error(CELL tagged, F_FIXNUM index, CELL max);