Created
September 30, 2013 14:05
-
-
Save headius/6764310 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment