<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
On a second look, this is a bit more complex - the exception has to be transported. So UserException does not handle suppressed exceptions at all; ExecutionControlForwarder, LocalExecutionControl, StreamingExecutionControl all need to update for suppressed
 exception handling. In particular, changing the forwarder's protocol might be a bit risky; I wonder if we want to dig into this.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> compiler-dev <compiler-dev-retn@openjdk.org> on behalf of Chen Liang <chen.l.liang@oracle.com><br>
<b>Sent:</b> Thursday, October 30, 2025 6:35 PM<br>
<b>To:</b> Pavel Rappo <pavel.rappo@gmail.com>; compiler-dev@openjdk.org <compiler-dev@openjdk.org><br>
<b>Subject:</b> Re: Print suppressed exceptions in JShell</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div class="x_elementToProof" style="font-family:"Calibri Light","Helvetica Light",sans-serif; font-size:12pt; color:rgb(0,0,0)">
I think it is probably just an oversight. This seems to be printed by JShellTool::displayEvalException, which shouldn't be too hard to add printing for suppressed exceptions.</div>
<div class="x_elementToProof" style="font-family:"Calibri Light","Helvetica Light",sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:"Calibri Light","Helvetica Light",sans-serif; font-size:12pt; color:rgb(0,0,0)">
-Chen</div>
<div class="x_elementToProof" style="font-family:"Calibri Light","Helvetica Light",sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_appendonsend"></div>
<div><br>
<div style="font-family:Calibri; text-align:left; color:rgb(0,0,0); margin-left:5pt; font-size:10pt">
Confidential – Oracle Internal</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> compiler-dev <compiler-dev-retn@openjdk.org> on behalf of Pavel Rappo <pavel.rappo@gmail.com><br>
<b>Sent:</b> Thursday, October 30, 2025 5:06 PM<br>
<b>To:</b> compiler-dev@openjdk.org <compiler-dev@openjdk.org><br>
<b>Subject:</b> Print suppressed exceptions in JShell</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">Is there any reason why JShell does not print out suppressed<br>
exceptions? I think it would be good to print them.<br>
<br>
    jshell> new Throwable()<br>
    $1 ==> java.lang.Throwable<br>
<br>
    jshell> new Error()<br>
    $2 ==> java.lang.Error<br>
<br>
    jshell> $1.addSuppressed($2)<br>
<br>
    jshell> throw $1<br>
    |  Exception java.lang.Throwable<br>
    |        at (#1:1)<br>
<br>
-Pavel<br>
</div>
</span></font></div>
</div>
</body>
</html>