Package org.jruby.embed

Examples of org.jruby.embed.EvalFailedException


                vars.retrieve(ret);
            }
            return ret;
        } catch (RaiseException e) {
            runtime.printError(e.getException());
            throw new EvalFailedException(e.getMessage(), e);
        } catch (StackOverflowError soe) {
            throw runtime.newSystemStackError("stack level too deep", soe);
        } catch (Throwable e) {
            Writer w = container.getErrorWriter();
            if (w instanceof PrintWriter) {
                e.printStackTrace((PrintWriter)w);
            } else {
                try {
                    w.write(e.getMessage());
                } catch (IOException ex) {
                    throw new EvalFailedException(ex);
                }
            }
            throw new EvalFailedException(e);
        } finally {
            if (sharing_variables) {
                runtime.getCurrentContext().popScope();
            }
            vars.terminate();
View Full Code Here


        InputStream istream = null;
        try {
            istream = new BufferedInputStream(url.openStream());
            return this.runScriptlet(istream, getFilename(bundle, path));
        } catch (IOException ioe) {
            throw new EvalFailedException(ioe);
        } finally {
            if (istream != null) try { istream.close(); } catch (IOException ioe) {};
        }
    }
View Full Code Here

        InputStream istream = null;
        try {
            istream = new BufferedInputStream(url.openStream());
            return super.parse(istream, getFilename(bundle, path));
        } catch (IOException ioe) {
            throw new EvalFailedException(ioe);
        } finally {
            if (istream != null) try { istream.close(); } catch (IOException ioe) {};
        }
    }
View Full Code Here

            // handle exits as simple script termination
            if (e.getException() instanceof RubySystemExit) {
                return ((RubySystemExit)e.getException()).status();
            }
            runtime.printError(e.getException());
            throw new EvalFailedException(e.getMessage(), e);
        } catch (StackOverflowError soe) {
            throw runtime.newSystemStackError("stack level too deep", soe);
        } catch (Throwable e) {
            throw new EvalFailedException(e);
        } finally {
            if (sharing_variables) {
                threadContext.popScope();
            }
            vars.terminate();
View Full Code Here

            // handle exits as simple script termination
            if (e.getException() instanceof RubySystemExit) {
                return ((RubySystemExit)e.getException()).status();
            }
            runtime.printError(e.getException());
            throw new EvalFailedException(e.getMessage(), e);
        } catch (StackOverflowError soe) {
            throw runtime.newSystemStackError("stack level too deep", soe);
        } catch (Throwable e) {
            throw new EvalFailedException(e);
        } finally {
            if (sharing_variables) {
                threadContext.popScope();
            }
            vars.terminate();
View Full Code Here

        InputStream istream = null;
        try {
            istream = new BufferedInputStream(url.openStream());
            return this.runScriptlet(istream, getFilename(bundle, path));
        } catch (IOException ioe) {
            throw new EvalFailedException(ioe);
        } finally {
            if (istream != null) try { istream.close(); } catch (IOException ioe) {};
        }
    }
View Full Code Here

        InputStream istream = null;
        try {
            istream = new BufferedInputStream(url.openStream());
            return super.parse(istream, getFilename(bundle, path));
        } catch (IOException ioe) {
            throw new EvalFailedException(ioe);
        } finally {
            if (istream != null) try { istream.close(); } catch (IOException ioe) {};
        }
    }
View Full Code Here

        InputStream istream = null;
        try {
            istream = new BufferedInputStream(url.openStream());
            return this.runScriptlet(istream, getFilename(bundle, path));
        } catch (IOException ioe) {
            throw new EvalFailedException(ioe);
        } finally {
            if (istream != null) try { istream.close(); } catch (IOException ioe) {};
        }
    }
View Full Code Here

        InputStream istream = null;
        try {
            istream = new BufferedInputStream(url.openStream());
            return super.parse(istream, getFilename(bundle, path));
        } catch (IOException ioe) {
            throw new EvalFailedException(ioe);
        } finally {
            if (istream != null) try { istream.close(); } catch (IOException ioe) {};
        }
    }
View Full Code Here

          + sampleBundleSymName);
    }
   
    //this is expected to fail because the bundle is not registered yet
    //as a library to the jruby runtime:
    EvalFailedException failedEval = null;
    try {
      runScriptletWithoutAddingBundleToJRubyClassPath(_container, bundle, extendMyOtherClassPath);
    } catch (EvalFailedException ev) {
      //ok.
      failedEval = ev;
View Full Code Here

TOP

Related Classes of org.jruby.embed.EvalFailedException

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.