Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Should the rewrite.java.trace=true option be true by default?
system ~/projects/jruby $ jruby -Xrewrite.java.trace=true -X-C run_blah.rb
Blah.java:3:in `go': java.lang.Exception
from java/lang/reflect/Method.java:597:in `invoke'
from run_blah.rb:6:in `bar'
from run_blah.rb:2:in `foo'
from run_blah.rb:9:in `(root)'
system ~/projects/jruby $ jruby -X-C run_blah.rb
Blah.java:3:in `go': java.lang.Exception
from NativeMethodAccessorImpl.java:-2:in `invoke0'
from NativeMethodAccessorImpl.java:39:in `invoke'
from DelegatingMethodAccessorImpl.java:25:in `invoke'
from Method.java:597:in `invoke'
from JavaMethod.java:440:in `invokeDirectWithExceptionHandling'
from JavaMethod.java:362:in `invokeStaticDirect'
from StaticMethodInvoker.java:50:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:60:in `interpret'
from NewlineNode.java:105:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from NewlineNode.java:105:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from RootNode.java:129:in `interpret'
from ASTInterpreter.java:121:in `INTERPRET_ROOT'
from Ruby.java:833:in `runInterpreter'
from Ruby.java:841:in `runInterpreter'
from Ruby.java:686:in `runNormally'
from Ruby.java:521:in `runFromMain'
from Main.java:395:in `doRunFromMain'
from Main.java:290:in `internalRun'
from Main.java:217:in `run'
from Main.java:197:in `main'
system ~/projects/jruby $ cat -n run_blah.rb
1 def foo
2 bar
3 end
4
5 def bar
6 Java::Blah.go
7 end
8
9 foo
system ~/projects/jruby $ cat -n Blah.java
1 public class Blah {
2 public static void go() throws Exception {
3 throw new Exception();
4 }
5 }
@headius

This comment has been minimized.

Copy link
Owner Author

@headius headius commented Dec 27, 2013

See also jruby/jruby#1313

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment