Date: Fri, 28 Aug 2026 14:15:57 +0200
On 8/28/26 12:08, Sebastian Wittmeier via Std-Proposals wrote:
> h(g(f()))
>
>
> One important philosophy of exceptions is that code in-between - like the function g - does not have to care, what kind of exceptions are thrown by f, as long as h handles it.
Neither g nor h will ever see the exception if f throws. Neither g nor
h have the opportunity to handle the exception. Neither g nor h will
even be called.
> h(g(f()))
>
>
> One important philosophy of exceptions is that code in-between - like the function g - does not have to care, what kind of exceptions are thrown by f, as long as h handles it.
Neither g nor h will ever see the exception if f throws. Neither g nor
h have the opportunity to handle the exception. Neither g nor h will
even be called.
-- Rainer Deyke - rainerd_at_[hidden]
Received on 2026-08-28 12:16:06
