public
Created

  • Download Gist
gistfile1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
diff --git a/core/src/main/java/org/jruby/Ruby.java b/core/src/main/java/org/jruby/Ruby.java
index 1d12ac0..4ede395 100644
--- a/core/src/main/java/org/jruby/Ruby.java
+++ b/core/src/main/java/org/jruby/Ruby.java
@@ -2706,6 +2706,7 @@ public final class Ruby {
}
PrintStream errorStream = getErrorStream();
+ errorStream.println("Unhandled exception in thread " + Thread.currentThread().getName() + ":");
errorStream.print(config.getTraceType().printBacktrace(excp, errorStream == System.err && getPosix().isatty(FileDescriptor.err)));
}
diff --git a/core/src/main/java/org/jruby/RubyThread.java b/core/src/main/java/org/jruby/RubyThread.java
index d03135e..e6c89f2 100644
--- a/core/src/main/java/org/jruby/RubyThread.java
+++ b/core/src/main/java/org/jruby/RubyThread.java
@@ -1178,7 +1178,8 @@ public class RubyThread extends RubyObject implements ExecutionContext {
runtime.getThreadService().getMainThread().raise(new IRubyObject[] {systemExit}, Block.NULL_BLOCK);
return;
- } else if (runtime.getDebug().isTrue()) {
+ } else {
+ // mri-6647: log something for raised exceptions when not aborting
runtime.printError(exception.getException());
}
exitingException = exception;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.