Print suppressed exceptions in JShell

Pavel Rappo pavel.rappo at gmail.com
Thu Oct 30 22:06:31 UTC 2025


Is there any reason why JShell does not print out suppressed
exceptions? I think it would be good to print them.

    jshell> new Throwable()
    $1 ==> java.lang.Throwable

    jshell> new Error()
    $2 ==> java.lang.Error

    jshell> $1.addSuppressed($2)

    jshell> throw $1
    |  Exception java.lang.Throwable
    |        at (#1:1)

-Pavel


More information about the compiler-dev mailing list