The Right Approach to Exceptions

deadalnix deadalnix at
Tue Feb 21 12:32:35 PST 2012

Le 21/02/2012 00:23, Andrei Alexandrescu a écrit :
> On 2/20/12 4:44 PM, Juan Manuel Cabo wrote:
>> HAhaha, it sometimes feel as though people are afraid that the
>> Variant[string]
>> idea is to never use plain old variables and never use exception
>> subclasses. :-)
>> On the contrary, the idea is so that plain old variables and exception
>> subclasses
>> can be created for the right reasons, and to remove cases where they need
>> to be created for the wrong reasons.
> Yah, I think there's a lot of confusion and consequent apprehension
> regarding this. Thanks for attempting to clarify things.
> Andrei

So it doesn't help. Dulb subclasses of Exceptions are done mostly to be 
able to catch them. To avoid useless subclasses, we need a more precise 
way to catch Exception than the type only.

This Variant[string] doesn't help.

More information about the Digitalmars-d mailing list