<div dir="auto">Thanks for the responses everyone. It appears that there are several examples that return too. Sounds like the reason is convention then.<div dir="auto"><div dir="auto"><br></div><div dir="auto">I guess a better question might be, why were all these API's named with Exception rather than Throwable in the first place? What benefit is there in naming it Exception?</div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Aug 1, 2025, 4:47 AM Remi Forax <<a href="mailto:forax@univ-mlv.fr">forax@univ-mlv.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><div><br></div><div><br></div><hr id="m_-790280557419120909zwchr"><div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"Alan Bateman" <<a href="mailto:alan.bateman@oracle.com" target="_blank" rel="noreferrer">alan.bateman@oracle.com</a>><br><b>To: </b>"David Alayachew" <<a href="mailto:davidalayachew@gmail.com" target="_blank" rel="noreferrer">davidalayachew@gmail.com</a>>, "loom-dev" <<a href="mailto:loom-dev@openjdk.org" target="_blank" rel="noreferrer">loom-dev@openjdk.org</a>><br><b>Sent: </b>Friday, August 1, 2025 10:28:04 AM<br><b>Subject: </b>Re: Bikeshedding Structured Concurrency<br></blockquote></div><div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div>On 01/08/2025 06:05, David Alayachew
wrote:<br>
</div>
<blockquote>
<div dir="ltr">
<div class="gmail_default" style="font-family:monospace">Hello <a class="gmail_plusreply" id="m_-790280557419120909plusReplyChip-0" href="mailto:loom-dev@openjdk.org" target="_blank" rel="noreferrer">@loom-dev</a>,</div>
<div class="gmail_default" style="font-family:monospace"><br>
</div>
<div class="gmail_default" style="font-family:monospace">I have
been enjoying the Structured Concurrency JEP's as they have
come, and I am excited to try the JDK 25 variant with all the
new changes with Joiner.</div>
<div class="gmail_default" style="font-family:monospace"><br>
</div>
<div class="gmail_default" style="font-family:monospace">I have
a bikeshed request.</div>
<div class="gmail_default" style="font-family:monospace"><br>
</div>
<div class="gmail_default" style="font-family:monospace">For
Subtask, can we change the method name from exception() to
throwable()? It more accurately describes what is happening.</div>
<br>
</div>
</blockquote>
<br>
In j.u.concurrent there is
CompletableFuture.completeExceptionally(Throwable)/obtrudeException(Throwable),
SubmissionPublisher.closeExceptionally(Throwable),
ForkJoinTask.getException and Future.exceptionNow() returning a
Throwable, and a few more.</blockquote><div><br></div><div>yes, also Future.exceptionNow().</div><div><br></div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><br>
<br>
The main use of Subtask::exception will be a custom Joiner's
onComplete implementation where handles the exception or error when
the subtask fails. There is an argument that fork should be void or
just return a Supplier (Subtask extends Supplier) but there hasn't
been enough feedback from real-world usage to help that discussion.<br>
<br>
-Alan<br></blockquote><div><br></div><div>Rémi</div><div><br></div></div></div></div></blockquote></div>