src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java Mon Mar 20 17:37:54 2017
--- new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java Mon Mar 20 17:37:54 2017
*** 401,411 ****
--- 401,413 ----
return newScope;
}
public RuntimeException handle(Throwable e) {
DebugScope lastClosed = lastClosedTL.get();
assert lastClosed.parent == this : "Debug.handle() used with no matching Debug.scope(...) or Debug.sandbox(...)";
+ try {
+ assert lastClosed.parent == this : "Debug.handle() used with no matching Debug.scope(...) or Debug.sandbox(...) " +
+ "or an exception occurred while opening a scope";
if (e != lastExceptionThrownTL.get()) {
RuntimeException newException = null;
instanceTL.set(lastClosed);
try (DebugScope s = lastClosed) {
newException = s.interceptException(e);
*** 417,426 ****
--- 419,432 ----
} else {
lastExceptionThrownTL.set(newException);
throw newException;
}
}
+ } catch (Throwable t) {
+ t.initCause(e);
+ throw t;
+ }
if (e instanceof Error) {
throw (Error) e;
}
if (e instanceof RuntimeException) {
throw (RuntimeException) e;
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File