factor/vm/errors.hpp

35 lines
668 B
C++
Raw Normal View History

2009-05-04 02:46:13 -04:00
namespace factor
{
2009-05-02 05:04:19 -04:00
/* Runtime errors */
2009-05-04 05:50:24 -04:00
enum vm_error_type
2009-05-02 05:04:19 -04:00
{
ERROR_EXPIRED = 0,
ERROR_IO,
ERROR_NOT_IMPLEMENTED,
ERROR_TYPE,
ERROR_DIVIDE_BY_ZERO,
ERROR_SIGNAL,
ERROR_ARRAY_SIZE,
ERROR_C_STRING,
ERROR_FFI,
ERROR_UNDEFINED_SYMBOL,
2010-03-27 07:33:28 -04:00
ERROR_DATASTACK_UNDERFLOW,
ERROR_DATASTACK_OVERFLOW,
ERROR_RETAINSTACK_UNDERFLOW,
ERROR_RETAINSTACK_OVERFLOW,
2010-03-27 07:45:11 -04:00
ERROR_CALLSTACK_UNDERFLOW,
ERROR_CALLSTACK_OVERFLOW,
2009-05-02 05:04:19 -04:00
ERROR_MEMORY,
ERROR_FP_TRAP,
2009-05-04 05:50:24 -04:00
};
2009-05-02 05:04:19 -04:00
2009-10-07 09:33:54 -04:00
void fatal_error(const char *msg, cell tagged);
void critical_error(const char *msg, cell tagged);
void out_of_memory();
2009-05-05 12:33:35 -04:00
void memory_signal_handler_impl();
void fp_signal_handler_impl();
2009-05-05 12:33:35 -04:00
void misc_signal_handler_impl();
2009-05-04 02:46:13 -04:00
}