[cfe-dev] Sometimes throwing constructors / destructors

Arnaud A. de Grandmaison arnaud.degrandmaison at arm.com
Fri Jul 25 02:14:48 PDT 2014


Hi Tim,

I understand your point but what bothers me is that if the first constructor call fails, I agree that there is no destructions to do, but the fact that it failed should still be signalled (with a resume, not a ret) so that I can be handled properly.

Cheers,
Arnaud

-----Original Message-----
From: Tim Northover [mailto:t.p.northover at gmail.com] 
Sent: 25 July 2014 10:43
To: Arnaud De Grandmaison
Cc: cfe-dev Developers
Subject: Re: [cfe-dev] Sometimes throwing constructors / destructors

Hi Arnaud,

On 25 July 2014 09:23, Arnaud A. de Grandmaison <arnaud.degrandmaison at arm.com> wrote:
> Why don’t we get an invoke for the first temporary constructor or 
> destructor call ?

Isn't it because there's nothing to clean up if the very first constructor called fails, so unwinding can just pass through this frame without action? However, if the second one fails you have to destroy the first object properly.

Similarly there's nothing that needs to be done if the very last destructor throws.

Cheers.

Tim.







More information about the cfe-dev mailing list