-
Bug
-
Resolution: Fixed
-
P3
-
9, 10, 11
-
b08
-
Verified
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. (Its pretty hard to debug the above without the underlying cause.)
-----------
The cause is not propagated at initial interception in the execution engine. This requires changes in the user code execution, the execution SPI, the representation of exceptions on the stream, the handling of evaluation, the JShell API, and the jshell tool.
-----------
The existing jshell tool display format for exceptions was not designed with chained exceptions in mind. It is not superior to that used by printStackTrace() and the JVM. Consistency with these is useful for transitioning. So, the jshell tool will use the standard format (which handles chained exceptions).
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. (Its pretty hard to debug the above without the underlying cause.)
-----------
The cause is not propagated at initial interception in the execution engine. This requires changes in the user code execution, the execution SPI, the representation of exceptions on the stream, the handling of evaluation, the JShell API, and the jshell tool.
-----------
The existing jshell tool display format for exceptions was not designed with chained exceptions in mind. It is not superior to that used by printStackTrace() and the JVM. Consistency with these is useful for transitioning. So, the jshell tool will use the standard format (which handles chained exceptions).
- relates to
-
JDK-8200703 Problem list jdk/jshell/ExceptionsTest.java fails on windows
- Resolved
-
JDK-8200701 jdk/jshell/ExceptionsTest.java fails on Windows, after JDK-8198801
- Closed