2006-05-24 04:29:25 -04:00
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
ERROR_EXPIRED
|
|
|
|
|
ERROR_IO
|
|
|
|
|
ERROR_UNDEFINED_WORD
|
|
|
|
|
ERROR_TYPE
|
|
|
|
|
ERROR_SIGNAL
|
|
|
|
|
ERROR_NEGATIVE_ARRAY_SIZE
|
|
|
|
|
ERROR_C_STRING
|
|
|
|
|
ERROR_FFI
|
|
|
|
|
ERROR_HEAP_SCAN
|
|
|
|
|
ERROR_UNDEFINED_SYMBOL
|
|
|
|
|
ERROR_USER_INTERRUPT
|
|
|
|
|
ERROR_DS_UNDERFLOW
|
|
|
|
|
ERROR_DS_OVERFLOW
|
|
|
|
|
ERROR_RS_UNDERFLOW
|
|
|
|
|
ERROR_RS_OVERFLOW
|
|
|
|
|
ERROR_CS_UNDERFLOW
|
|
|
|
|
ERROR_CS_OVERFLOW
|
|
|
|
|
ERROR_OBJECTIVE_C
|
|
|
|
|
} F_ERRORTYPE;
|
2004-07-16 02:26:21 -04:00
|
|
|
|
2005-09-20 20:18:01 -04:00
|
|
|
/* Are we throwing an error? */
|
|
|
|
|
bool throwing;
|
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;
|
2006-05-17 14:55:46 -04:00
|
|
|
/* Since longjmp restores registers, we must save all these values. */
|
2004-11-09 12:29:25 -05:00
|
|
|
CELL thrown_ds;
|
2006-05-14 23:09:47 -04:00
|
|
|
CELL thrown_rs;
|
2004-11-06 15:51:17 -05:00
|
|
|
|
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);
|
2006-05-24 04:29:25 -04:00
|
|
|
void general_error(F_ERRORTYPE error, CELL arg1, CELL arg2, bool keep_stacks);
|
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);
|
2004-10-03 16:07:48 -04:00
|
|
|
void primitive_throw(void);
|
2005-03-07 00:39:57 -05:00
|
|
|
void primitive_die(void);
|