Package org.jruby.truffle.runtime.control

Examples of org.jruby.truffle.runtime.control.RaiseException


                context.getCoreLibrary().getFloatClass().getName(),
                receiverBoxed.getLogicalClass().getName(),
                methodName,
                valueBoxed.getLogicalClass().getName());

        throw new RaiseException(context.getCoreLibrary().typeErrorCantConvertTo(
                receiverBoxed.getLogicalClass().getName(),
                message,
                this));
    }
View Full Code Here


        final RubyMethod missingMethod = lookup(callerClass, receiverObject, "const_missing", ignoreVisibility,
                dispatchAction);

        if (missingMethod == null) {
            CompilerDirectives.transferToInterpreter();
            throw new RaiseException(getContext().getCoreLibrary().runtimeError(
                    receiverObject.toString() + " didn't have a #const_missing", this));
        }

        return callNode.call(
                frame,
View Full Code Here

        if (missingMethod == null) {
            if (dispatchAction == Dispatch.DispatchAction.RESPOND_TO_METHOD) {
                return false;
            } else {
                CompilerDirectives.transferToInterpreter();
                throw new RaiseException(getContext().getCoreLibrary().runtimeError(
                        receiverObject.toString() + " didn't have a #method_missing", this));
            }
        }

        if (dispatchAction == Dispatch.DispatchAction.CALL_METHOD) {
View Full Code Here

        @Specialization
        public RubyNilClass raise(VirtualFrame frame, final RubyThread thread, RubyClass exceptionClass, RubyString message) {
            final RubyBasicObject exception = exceptionClass.newInstance(this);
            initialize.call(frame, exception, "initialize", null, message);
            final RaiseException exceptionWrapper = new RaiseException(exception);

            getContext().getSafepointManager().pauseAllThreadsAndExecute(new Consumer<Boolean>() {

                @Override
                public void accept(Boolean isPausingThread) {
View Full Code Here

            notDesignedForCompilation();

            self.join();

            if (self.getException() != null) {
                throw new RaiseException(self.getException());
            }

            if (self.getValue() == null) {
                return getContext().getCoreLibrary().getNilObject();
            } else {
View Full Code Here

        return ba;
    }

    public RubyObject utf8_char(RubyNode currentNode, RubyObject offset) {
        CompilerDirectives.transferToInterpreter();
        throw new RaiseException(currentNode.getContext().getCoreLibrary().runtimeError("ByteArray#utf8_char not implemented", currentNode));
    }
View Full Code Here

        }
  }

    // helper function, should maybe be moved elsewhere
    public static RubyException throwObjectBoundsExceededError(RubyNode currentNode, String message) {
        throw new RaiseException(currentNode.getContext().getCoreLibrary().getRubiniusLibrary().objectBoundsExceededError(currentNode, message));
    }
View Full Code Here

        throw new RaiseException(currentNode.getContext().getCoreLibrary().getRubiniusLibrary().objectBoundsExceededError(currentNode, message));
    }

    // helper function, should maybe be moved elsewhere
    public static void throwArgumentError(RubyNode currentNode, String message) {
        throw new RaiseException(currentNode.getContext().getCoreLibrary().argumentError(message, currentNode));
    }
View Full Code Here

            super(prev);
        }

        @Specialization
        public RubyObject allocate(RubyObject baClass, RubyObject size) {
            throw new RaiseException(getContext().getCoreLibrary().typeError("ByteArray cannot be created via allocate()", this));
        }
View Full Code Here

        final Object receiverObject = module.execute(frame);

        if (!(receiverObject instanceof RubyModule)) {
            CompilerDirectives.transferToInterpreter();
            throw new RaiseException(getContext().getCoreLibrary().typeErrorIsNotA(receiverObject.toString(), "class/module", this));
        }

        final RubyModule module = (RubyModule) receiverObject;

        module.setConstant(this, name, rhsValue);
View Full Code Here

TOP

Related Classes of org.jruby.truffle.runtime.control.RaiseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.