1 #ifndef RBX_EXCEPTION_POINT_HPP
2 #define RBX_EXCEPTION_POINT_HPP
6 #include "windows_compat.h"
9 class NativeMethodEnvironment
;
11 class ExceptionPoint
{
13 ExceptionPoint
* previous_
;
16 jmp_buf __jump_buffer
;
21 ExceptionPoint(NativeMethodEnvironment
* env
);
23 bool jumped_to() const {
31 void return_to(NativeMethodEnvironment
* env
);
33 void unwind_to_previous(NativeMethodEnvironment
* env
) {
34 previous_
->return_to(env
);
37 void pop(NativeMethodEnvironment
* env
);
41 #define PLACE_EXCEPTION_POINT(ep) ep.file = __FILE__; ep.line = __LINE__; set_jump(ep.__jump_buffer)