On Friday, 19 May 2017 at 15:45:28 UTC, Mike Parker wrote:
Destroy!


In catch blocks, e is regarded as scope so that it cannot escape the catch block.
...
Code that needs to leak the thrown exception object can clone the object.

There's a contradiction here. Generic cloning cannot be implemented without storing exceptions for rethrowing later (in case member destructors throw).

Furthermore:

2. Disallowing Exception objects with postblit fields.

What about fields with destructors? I detect a double-free. If we need to clone, we need postblits and destructors, or neither.

It looks as if that clause is added specifically to deal with cloning. Yet no information on cloning implementation is provided.

Reply via email to