The Right Approach to Exceptions

Sean Kelly sean at invisibleduck.org
Mon Feb 20 11:13:29 PST 2012


On Feb 20, 2012, at 9:55 AM, deadalnix wrote:
> 
> And so variant is the way to go ?
> 
> Clearly, this is a very strong arguement in favor of typed Exception, that provide usefull information about what went wrong. This is a safe approach.
> 
> Because this Variant stuff is going to require massive ducktyping of Exceptions, with all possible errors involved. The keys in the Variant[string] will depend on the Exception the dev is facing. This should be avoided and should warn us about the requirement of typed Exceptions.

I think its debatable whether a Variant[string] or string[string] is ideal here, but either way I think the point of the table is for localized error messages.  I wouldn't expect any data relevant for filtering the exception within the table.  



More information about the Digitalmars-d mailing list