Making AssertError a singleton

Shachar Shemesh via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 12 22:36:47 PST 2016


On 13/12/16 02:57, Andrei Alexandrescu wrote:
>
> You can catch AssertError. There's no guarantees dtors have been called
> during unwinding. -- Andrei

That makes no sense to me, unless you only want to catch it in order to 
do something right before exiting anyways.

Also, please note that not all non-Exception Throwables are terminal for 
the process. We use a Throwable that is not an Exception in order to 
force termination of a fiber from outside in a clean way. If proper 
unwinding is not guaranteed under this condition, we have a problem.

Shachar


More information about the Digitalmars-d mailing list