Forum: JRuby feature request: better line numbers in java backtraces

Posted by Roger Pack (rogerdpack)
on 2013-02-02 00:23
It might be nice is java "internal" exceptions, like out of heap space,
when rescued by ruby code, had better looking stack traces somehow, for
instance this have heap space error has this backtrace:

 thread died Java heap space
org.jruby.util.ByteList.<init>(ByteList.java:91)
org.jruby.RubyIO.sysread(RubyIO.java:2801)
org.jruby.RubyIO$INVOKER$i$0$1$sysread.call(RubyIO$INVOKER$i$0$1$sysread.gen)
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:646)
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:204)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:160)
org.jruby.runtime.Block.yield(Block.java:130)
org.jruby.RubyIO.open(RubyIO.java:1183)
org.jruby.RubyIO$INVOKER$s$0$0$open.call(RubyIO$INVOKER$s$0$0$open.gen)
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:216)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:356)
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:213)
org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:222)
org.jruby.ast.CallTwoArgBlockNode.interpret(CallTwoArgBlockNode.java:62)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.ast.WhileNode.interpret(WhileNode.java:131)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:160)
org.jruby.runtime.Block.yield(Block.java:130)
org.jruby.RubyIO.open(RubyIO.java:1183)
org.jruby.RubyIO$INVOKER$s$0$0$open.call(RubyIO$INVOKER$s$0$0$open.gen)
...


which basically lacks ruby callsite information (line numbers, etc.)

Thanks!
-r
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.