private Object handleException(VirtualFrame frame, RuntimeException exception) { CompilerAsserts.neverPartOfCompilation(); final RubyContext context = getContext(); final RubyBasicObject rubyException = ExceptionTranslator.translateException(context, exception); context.getCoreLibrary().getGlobalVariablesObject().setInstanceVariable("$!", rubyException); for (RescueNode rescue : rescueParts) { if (rescue.canHandle(frame, rubyException)) { return rescue.execute(frame); } } throw exception; }
@ExplodeLoop private Object handleException(VirtualFrame frame, RaiseException exception) { CompilerAsserts.neverPartOfCompilation(); notDesignedForCompilation(); getContext() .getCoreLibrary() .getGlobalVariablesObject() .getOperations() .setInstanceVariable( getContext().getCoreLibrary().getGlobalVariablesObject(), "$!", exception.getRubyException()); for (RescueNode rescue : rescueParts) { if (rescue.canHandle(frame, exception.getRubyException())) { return rescue.execute(frame); } } throw exception; }
protected SetDispatchNode rewrite(SetDispatchNode next) { CompilerAsserts.neverPartOfCompilation(); assert this != next; return replace(next); }