What is throwable
Don
nospam at nospam.com
Thu Mar 19 13:17:30 PDT 2009
Andrei Alexandrescu wrote:
> Denis Koroskin wrote:
>> On Thu, 19 Mar 2009 19:39:52 +0300, Andrei Alexandrescu
>> <SeeWebsiteForEmail at erdani.org> wrote:
>>
>>> Ary Borenszweig wrote:
>>>> Andrei Alexandrescu wrote:
>>>>> Anyhow, we should implement a model in D that allows such multiple
>>>>> throws.
>>>> What for?
>>>
>>> For allowing destructors to throw.
>>>
>>> Andrei
>>
>> Are you sure this is sound?
>
> Yes. The notion that throwing destructors should terminate the
> application pronto is a prejudice we got from C++.
>
> Andrei
And it causes lots of problems, in my experience. Since it usually
doesn't terminate the app, just the thread with the defective
destructor. Which is unnecessarily difficult to debug.
More information about the Digitalmars-d
mailing list