Package org.jruby.exceptions

Examples of org.jruby.exceptions.RaiseException.initCause()


        try {
            return JavaObject.wrap(getRuntime(), newInstance(converted, handler));
        } catch (Exception e) {
            RaiseException ex = getRuntime().newArgumentError(
                    "Constructor invocation failed: " + e.getMessage());
            ex.initCause(e);
            throw ex;
        }
    }
   
    public JavaObject newInstance(final IRubyObject self, Object[] args) {
View Full Code Here


        try {
            return JavaObject.wrap(getRuntime(), newInstance(args, handler));
        } catch (Exception e) {
            RaiseException ex = getRuntime().newArgumentError(
                    "Constructor invocation failed: " + e.getMessage());
            ex.initCause(e);
            throw ex;
        }
    }

    @JRubyMethod(required = 1, optional = 1, frame = true)
View Full Code Here

        try {
            result = newInstance(converted, handler);
        } catch (Exception e) {
            RaiseException ex = getRuntime().newArgumentError(
                    "Constructor invocation failed: " + e.getMessage());
            ex.initCause(e);
            throw ex;
        }

        return JavaObject.wrap(getRuntime(), result);
View Full Code Here

       
        try {
            return getProxyClass(recv.getRuntime(), (Class) type.getValue(), new Class[0]);
        } catch (Error e) {
            RaiseException ex = recv.getRuntime().newArgumentError("unable to create proxy class for " + type.getValue());
            ex.initCause(e);
            throw ex;
        } catch (InvocationTargetException e) {
            RaiseException ex = recv.getRuntime().newArgumentError("unable to create proxy class for " + type.getValue());
            ex.initCause(e);
            throw ex;
View Full Code Here

            RaiseException ex = recv.getRuntime().newArgumentError("unable to create proxy class for " + type.getValue());
            ex.initCause(e);
            throw ex;
        } catch (InvocationTargetException e) {
            RaiseException ex = recv.getRuntime().newArgumentError("unable to create proxy class for " + type.getValue());
            ex.initCause(e);
            throw ex;
        }
    }
   
    private static final HashSet<String> EXCLUDE_MODULES = new HashSet<String>();
View Full Code Here

        try {
            return getProxyClass(recv.getRuntime(), javaClass.javaClass(), interfaces, names);
        } catch (Error e) {
            RaiseException ex = recv.getRuntime().newArgumentError("unable to create proxy class for " + javaClass.getValue() + " : " + e.getMessage());
            //e.printStackTrace();
            ex.initCause(e);
            throw ex;
        } catch (InvocationTargetException e) {
            RaiseException ex = recv.getRuntime().newArgumentError("unable to create proxy class for " + javaClass.getValue() + " : " + e.getMessage());
            //e.printStackTrace();
            ex.initCause(e);
View Full Code Here

            ex.initCause(e);
            throw ex;
        } catch (InvocationTargetException e) {
            RaiseException ex = recv.getRuntime().newArgumentError("unable to create proxy class for " + javaClass.getValue() + " : " + e.getMessage());
            //e.printStackTrace();
            ex.initCause(e);
            throw ex;
        }
    }

    @JRubyMethod
View Full Code Here

            reraiseRaiseExceptions(e);

            if(runtime.getDebug().isTrue()) e.printStackTrace();
           
            RaiseException re = runtime.newLoadError("IO error -- " + state.searchFile);
            re.initCause(e);
            throw re;
        }
    }
   
    private final List<LoadSearcher> searchers = new ArrayList<LoadSearcher>();
View Full Code Here

            reraiseRaiseExceptions(e);

            if(runtime.getDebug().isTrue()) e.printStackTrace(runtime.getErr());
           
            RaiseException re = newLoadErrorFromThrowable(runtime, state.searchFile, e);
            re.initCause(e);
            throw re;
        }
    }

    private static RaiseException newLoadErrorFromThrowable(Ruby runtime, String file, Throwable t) {
View Full Code Here

        try {
            return JavaObject.wrap(getRuntime(), newInstance(converted, handler));
        } catch (Exception e) {
            RaiseException ex = getRuntime().newArgumentError(
                    "Constructor invocation failed: " + e.getMessage());
            ex.initCause(e);
            throw ex;
        }
    }
   
    public JavaObject newInstance(final IRubyObject self, Object[] args) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.