2013-05-11 21:59:37 -04:00
|
|
|
namespace factor {
|
2009-05-04 02:46:13 -04:00
|
|
|
|
2016-08-05 08:44:37 -04:00
|
|
|
// Runtime errors must be kept in sync with:
|
|
|
|
// basis/debugger/debugger.factor
|
|
|
|
// core/kernel/kernel.factor
|
2016-03-22 10:56:41 -04:00
|
|
|
#define KERNEL_ERROR 0xfac7
|
|
|
|
|
2013-05-11 21:59:37 -04:00
|
|
|
enum vm_error_type {
|
|
|
|
ERROR_EXPIRED = 0,
|
|
|
|
ERROR_IO,
|
2016-11-23 04:20:09 -05:00
|
|
|
ERROR_UNUSED,
|
2013-05-11 21:59:37 -04:00
|
|
|
ERROR_TYPE,
|
|
|
|
ERROR_DIVIDE_BY_ZERO,
|
|
|
|
ERROR_SIGNAL,
|
|
|
|
ERROR_ARRAY_SIZE,
|
2014-06-03 12:52:38 -04:00
|
|
|
ERROR_OUT_OF_FIXNUM_RANGE,
|
2013-05-11 21:59:37 -04:00
|
|
|
ERROR_FFI,
|
|
|
|
ERROR_UNDEFINED_SYMBOL,
|
|
|
|
ERROR_DATASTACK_UNDERFLOW,
|
|
|
|
ERROR_DATASTACK_OVERFLOW,
|
|
|
|
ERROR_RETAINSTACK_UNDERFLOW,
|
|
|
|
ERROR_RETAINSTACK_OVERFLOW,
|
|
|
|
ERROR_CALLSTACK_UNDERFLOW,
|
|
|
|
ERROR_CALLSTACK_OVERFLOW,
|
|
|
|
ERROR_MEMORY,
|
|
|
|
ERROR_FP_TRAP,
|
|
|
|
ERROR_INTERRUPT,
|
2014-09-09 06:44:01 -04:00
|
|
|
ERROR_CALLBACK_SPACE_OVERFLOW
|
2009-05-04 05:50:24 -04:00
|
|
|
};
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2013-05-11 21:59:37 -04:00
|
|
|
void fatal_error(const char* msg, cell tagged);
|
|
|
|
void critical_error(const char* msg, cell tagged);
|
2009-05-05 12:33:35 -04:00
|
|
|
void memory_signal_handler_impl();
|
2009-09-06 09:44:25 -04:00
|
|
|
void fp_signal_handler_impl();
|
2011-10-19 18:39:44 -04:00
|
|
|
void synchronous_signal_handler_impl();
|
2009-05-04 02:46:13 -04:00
|
|
|
|
|
|
|
}
|