]> gitweb.factorcode.org Git - factor.git/blob - vm/errors.hpp
kernel: symbolic constants for the various kernel errors
[factor.git] / vm / errors.hpp
1 namespace factor {
2
3 // Runtime errors must be kept in sync with:
4 //   core/kernel/kernel.factor
5 enum vm_error_type {
6   ERROR_EXPIRED = 0,
7   ERROR_IO,
8   ERROR_NOT_IMPLEMENTED,
9   ERROR_TYPE,
10   ERROR_DIVIDE_BY_ZERO,
11   ERROR_SIGNAL,
12   ERROR_ARRAY_SIZE,
13   ERROR_C_STRING,
14   ERROR_FFI,
15   ERROR_UNDEFINED_SYMBOL,
16   ERROR_DATASTACK_UNDERFLOW,
17   ERROR_DATASTACK_OVERFLOW,
18   ERROR_RETAINSTACK_UNDERFLOW,
19   ERROR_RETAINSTACK_OVERFLOW,
20   ERROR_CALLSTACK_UNDERFLOW,
21   ERROR_CALLSTACK_OVERFLOW,
22   ERROR_MEMORY,
23   ERROR_FP_TRAP,
24   ERROR_INTERRUPT,
25 };
26
27 void fatal_error(const char* msg, cell tagged);
28 void critical_error(const char* msg, cell tagged);
29 void out_of_memory();
30 void memory_signal_handler_impl();
31 void fp_signal_handler_impl();
32 void synchronous_signal_handler_impl();
33
34 }