<div dir="auto"><div dir="auto">In a better world, I would suggest modifying the current callable to have signature `Callable<R, E extends Exception>` to enable a fine grained exceptions in Today's callable.</div><div dir="auto"><br></div><div dir="auto">Unfortunately while this will have backwards compatibility on the bytecode level, it will break a lot of code bases.</div><div dir="auto"><br></div><div dir="auto">Of course this problem is not only in callable, it is practically with any functional interface, maybe it worth making a new package `java.util.function.exceptionally` that will be similar to `java.util.function` but with correct exception handling (should I cc the code-dev mailing list?)</div><div dir="auto"><br></div><div dir="auto">As a side note, generally I'm a bit disappointed from the state of exceptions with generics in Java, not too long ago I talked about it in (I believe) the Amber mailing list about possible improvements in the future.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 13, 2023, 13:15 Andrew Haley <<a href="mailto:aph-open@littlepinkcloud.com">aph-open@littlepinkcloud.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 4/13/23 09:08, Kasper Nielsen wrote:<br>
> Not adding more interfaces would of course be preferable.<br>
> But I would argue that not providing an easy way for working<br>
> with Throwables for such a low-level tool is the worse solution.<br>
<br>
+1. I'm on it.<br>
<br>
-- <br>
Andrew Haley  (he/him)<br>
Java Platform Lead Engineer<br>
Red Hat UK Ltd. <<a href="https://www.redhat.com" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com</a>><br>
<a href="https://keybase.io/andrewhaley" rel="noreferrer noreferrer" target="_blank">https://keybase.io/andrewhaley</a><br>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671<br>
<br>
</blockquote></div>