Skip to content

Instantly share code, notes, and snippets.

@headius headius/output.txt
Created Jan 8, 2020

Embed
What would you like to do?
Comparison of JRuby stack traces with and without Java frames
[] ~/projects/jruby $ jruby -e 'def foo; bar; end; def bar; 1.times { eval "raise" }; end; foo'
RuntimeError: No current exception
bar at (eval):1
eval at org/jruby/RubyKernel.java:1048
bar at -e:1
bar at -e:1
foo at -e:1
<main> at -e:1
[] ~/projects/jruby $ jruby -Xbacktrace.style=full -e 'def foo; bar; end; def bar; 1.times { eval "raise" }; end; foo'
RuntimeError: No current exception
getStackTrace at java/lang/Thread.java:1559
getBacktraceData at org/jruby/runtime/backtrace/TraceType.java:242
getBacktrace at org/jruby/runtime/backtrace/TraceType.java:53
captureBacktrace at org/jruby/RubyException.java:373
preRaise at org/jruby/exceptions/RaiseException.java:114
<init> at org/jruby/exceptions/RaiseException.java:64
<init> at org/jruby/exceptions/Exception.java:38
<init> at org/jruby/exceptions/StandardError.java:38
<init> at org/jruby/exceptions/RuntimeError.java:38
constructThrowable at org/jruby/RubyRuntimeError.java:52
toThrowable at org/jruby/RubyException.java:351
from at org/jruby/exceptions/RaiseException.java:80
raise at org/jruby/RubyKernel.java:869
call at org/jruby/RubyKernel$INVOKER$s$0$3$raise.gen:-1
call at org/jruby/internal/runtime/methods/DynamicMethod.java:196
call at org/jruby/internal/runtime/methods/DynamicMethod.java:192
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:354
call at org/jruby/runtime/callsite/CachingCallSite.java:143
processCall at org/jruby/ir/interpreter/InterpreterEngine.java:345
interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:72
INTERPRET_EVAL at org/jruby/ir/interpreter/Interpreter.java:106
bar at (eval):1
evalCommon at org/jruby/ir/interpreter/Interpreter.java:158
evalWithBinding at org/jruby/ir/interpreter/Interpreter.java:182
evalCommon at org/jruby/RubyKernel.java:1086
eval at org/jruby/RubyKernel.java:1048
call at org/jruby/RubyKernel$INVOKER$s$0$3$eval.gen:-1
call at org/jruby/internal/runtime/methods/DynamicMethod.java:204
call at org/jruby/internal/runtime/methods/DynamicMethod.java:200
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:375
call at org/jruby/runtime/callsite/CachingCallSite.java:174
invokeOther1:eval at -e:1
bar at -e:1
yieldDirect at org/jruby/runtime/CompiledIRBlockBody.java:148
yieldSpecific at org/jruby/runtime/IRBlockBody.java:66
yieldSpecific at org/jruby/runtime/Block.java:153
times at org/jruby/RubyFixnum.java:279
call at org/jruby/RubyInteger$INVOKER$i$0$0$times.gen:-1
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:365
call at org/jruby/runtime/callsite/CachingCallSite.java:153
callIter at org/jruby/runtime/callsite/CachingCallSite.java:160
invokeOther2:times at -e:1
bar at -e:1
call at org/jruby/internal/runtime/methods/CompiledIRMethod.java:158
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:354
call at org/jruby/runtime/callsite/CachingCallSite.java:143
invokeOther0:bar at -e:1
foo at -e:1
call at org/jruby/internal/runtime/methods/CompiledIRMethod.java:158
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:354
call at org/jruby/runtime/callsite/CachingCallSite.java:143
invokeOther3:foo at -e:1
<main> at -e:1
invokeWithArguments at java/lang/invoke/MethodHandle.java:627
load at org/jruby/ir/Compiler.java:89
runScript at org/jruby/Ruby.java:1205
runNormally at org/jruby/Ruby.java:1128
runNormally at org/jruby/Ruby.java:1146
runFromMain at org/jruby/Ruby.java:958
doRunFromMain at org/jruby/Main.java:412
internalRun at org/jruby/Main.java:304
run at org/jruby/Main.java:234
main at org/jruby/Main.java:206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.