The Right Approach to Exceptions

Andrei Alexandrescu SeeWebsiteForEmail at
Sun Feb 19 08:48:24 PST 2012

On 2/19/12 10:40 AM, Jacob Carlborg wrote:
> The command could be in the exception. Then you would have to look it up
> against all valid commands. For the command to be in the exception you
> would need some sort of hierarchy because, as others have said, a
> command property wouldn't make sense for an exception like FileNotFound,
> and wouldn't make sense in the base class Exception.

Definitely, no argument there! To restate: all I want is to find ways to 
figure the "right" number of exception types, and the "right" primitives.


More information about the Digitalmars-d mailing list