Exception/Error division in D

Sean Kelly sean at invisibleduck.org
Wed May 30 07:46:46 PDT 2012


On May 30, 2012, at 7:21 AM, deadalnix <deadalnix at gmail.com> wrote:

> Le 30/05/2012 12:59, Jonathan M Davis a écrit :
>>> And it's very valuable to log it properly.
>> 
>> Yes, which is why it's better to have an Error thrown rather than a halt
>> instruction be executed. But that doesn't mean that any attempt at cleanup is
>> any more valid.
>> 
> 
> Sorry but that is bullshit. What can be the benefit of not trying to clean things up ?
> 
> Do you really consider that corrupted files, client waiting forever at the other end of a connection or any similar stuff is a good thing ? Because that is what you are advocating.
> 
> I may sound good on the paper, but in real life, system DOES fail. It isn't a question of if, but a question of when and how often, and what to do about it.

I'd certainly at least want to be given the option of cleaning up when an Error is thrown.  If not, I have a feeling that in circumstances where I really wanted it I'd do something horrible to make sure it happened in some other way. 


More information about the Digitalmars-d mailing list