Date: Fri, 28 Aug 2026 16:40:16 +0000
> 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.
That just not true at all. Code must be generated for g and h to be able to unwind, you just don't write it yourself. If f throws, code must pickup the context g and h and destroy objects that g and h have specifically created. There's a whole lot of stuff that happens when you throw, just none of it is transparent.
-----Original Message-----
From: Std-Proposals <std-proposals-bounces_at_lists.isocpp.org> On Behalf Of Rainer Deyke via Std-Proposals
Sent: Friday, August 28, 2026 14:16
To: std-proposals_at_[hidden]cpp.org
Cc: Rainer Deyke <rainerd_at_[hidden]>
Subject: Re: [std-proposals] fine-control exception/error/UB handling on function boundary
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.
--
Rainer Deyke - rainerd_at_[hidden]
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
That just not true at all. Code must be generated for g and h to be able to unwind, you just don't write it yourself. If f throws, code must pickup the context g and h and destroy objects that g and h have specifically created. There's a whole lot of stuff that happens when you throw, just none of it is transparent.
-----Original Message-----
From: Std-Proposals <std-proposals-bounces_at_lists.isocpp.org> On Behalf Of Rainer Deyke via Std-Proposals
Sent: Friday, August 28, 2026 14:16
To: std-proposals_at_[hidden]cpp.org
Cc: Rainer Deyke <rainerd_at_[hidden]>
Subject: Re: [std-proposals] fine-control exception/error/UB handling on function boundary
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.
--
Rainer Deyke - rainerd_at_[hidden]
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2026-08-28 16:40:23
