Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (20 sloc) 0.585 kb
#include "exception_point.hpp"
#include "builtin/nativemethod.hpp"
namespace rubinius {
ExceptionPoint::ExceptionPoint(NativeMethodEnvironment* env)
: jumped_to_(false)
, previous_(env->current_ep())
{
env->set_current_ep(this);
}
void ExceptionPoint::return_to(NativeMethodEnvironment* env) {
jumped_to_ = true;
env->set_current_ep(this);
_longjmp(__jump_buffer, 1);
// If control reaches here, longjmp failed, i.e. disaster.
abort();
}
void ExceptionPoint::pop(NativeMethodEnvironment* env) {
env->set_current_ep(previous_);
}
}
Jump to Line
Something went wrong with that request. Please try again.