Chained exception handling: bug?

Brian Goetz brian.goetz at oracle.com
Tue Feb 27 23:45:50 UTC 2018


If I evaluate an expression which results in throwing an exception, and 
that exception has a cause, the cause is not included in the stack trace:

jshell> $8.resolveConstantRef(MethodHandles.lookup())
|  java.lang.BootstrapMethodError thrown: bootstrap method 
initialization exception
|        at BootstrapMethodInvoker.invoke (BootstrapMethodInvoker.java:174)
|        at ConstantBootstraps.makeConstant (ConstantBootstraps.java:66)
|        at DynamicConstantRef.resolveConstantRef 
(DynamicConstantRef.java:308)
|        at (#22:1)

This exception had a chained cause, but it wasn't displayed.  Was the 
choice to only process the first exception in the chain deliberate, or 
is this an omission?  (Its pretty hard to debug the above without the 
underlying cause.)




More information about the kulla-dev mailing list