Skip to content

Commit

Permalink
Trying to find bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Feb 28, 2018
1 parent 06570f1 commit db87fac
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/src/main/java/org/jruby/ir/targets/ConstantLookupSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.lang.invoke.MethodType;
import java.lang.invoke.MutableCallSite;
import java.lang.invoke.SwitchPoint;
import java.util.Arrays;

import static java.lang.invoke.MethodHandles.guardWithTest;
import static org.jruby.util.CodegenUtils.p;
Expand Down Expand Up @@ -100,7 +101,14 @@ public IRubyObject searchConst(ThreadContext context, StaticScope staticScope) {
.insert(0, this)
.invokeVirtualQuiet(Bootstrap.LOOKUP, "searchConst");

setTarget(switchPoint.guardWithTest(target, fallback));
try {
setTarget(switchPoint.guardWithTest(target, fallback));
} catch (Throwable t) {
t.printStackTrace();
t.getCause().printStackTrace();
Arrays.stream(t.getSuppressed()).forEach((t2)->t2.printStackTrace());
throw t;
}

if (Options.INVOKEDYNAMIC_LOG_CONSTANTS.load()) {
LOG.info(name + "\tretrieved and cached from scope (searchConst) " + staticScope.getIRScope());
Expand Down

0 comments on commit db87fac

Please sign in to comment.