Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6ee231dafb82
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d82729f7024a
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Feb 19, 2016

  1. Copy the full SHA
    e1ef68a View commit details
  2. Copy the full SHA
    d82729f View commit details
Original file line number Diff line number Diff line change
@@ -1304,7 +1304,7 @@ public DynamicObject rangeError(String message, Node currentNode) {
}

public DynamicObject internalError(String message, Node currentNode) {
return internalError(message, currentNode);
return internalError(message, currentNode, null);
}

public DynamicObject internalError(String message, Node currentNode, Throwable javaThrowable) {
Original file line number Diff line number Diff line change
@@ -49,9 +49,8 @@ public Object execute(VirtualFrame frame) {
try {
return child.execute(frame);
} catch (StackOverflowError error) {
// TODO: we might want to do sth smarter here to avoid consuming frames when we are almost out of it.
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().systemStackError("stack level too deep", this));
throw new RaiseException(translate(error));
} catch (TruffleFatalException | ThreadExitException exception) {
CompilerDirectives.transferToInterpreter();
throw exception;
@@ -79,6 +78,15 @@ public Object execute(VirtualFrame frame) {
}
}

private DynamicObject translate(StackOverflowError error) {
if (getContext().getOptions().EXCEPTIONS_PRINT_JAVA) {
error.printStackTrace();
}

// TODO: we might want to do sth smarter here to avoid consuming frames when we are almost out of it.
return getContext().getCoreLibrary().systemStackError("stack level too deep", this);
}

private DynamicObject translate(ArithmeticException exception) {
if (getContext().getOptions().EXCEPTIONS_PRINT_JAVA) {
exception.printStackTrace();