Examples of RubyException


Examples of org.jruby.RubyException

    private static void dumpThread(Ruby ruby, RubyThread th, Gather gather, PrintWriter pw) {
        pw.println("Thread: " + th.getNativeThread().getName());
        pw.println("Stack:");
        ThreadContext tc = th.getContext();
        if (tc != null) {
            RubyException exc = new RubyException(ruby, ruby.getRuntimeError(), "thread dump");
            exc.setBacktraceData(gather.getBacktraceData(tc, th.getNativeThread().getStackTrace(), true));
            pw.println(Format.MRI.printBacktrace(exc, false));
        } else {
            pw.println("    [no longer alive]");
        }
        pw.println();
View Full Code Here

Examples of org.jruby.truffle.runtime.core.RubyException

    public <T> T handlingTopLevelRaise(Supplier<T> run, T defaultValue) {
        try {
            return run.get();
        } catch (RaiseException e) {
            // TODO(CS): what's this cast about?
            final RubyException rubyException = (RubyException) e.getRubyException();

            for (String line : Backtrace.DISPLAY_FORMATTER.format(this, rubyException, rubyException.getBacktrace())) {
                System.err.println(line);
            }
        } catch (ThreadExitException e) {
            // Ignore
        }
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.