The Right Approach to Exceptions
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Feb 20 12:50:29 PST 2012
On 2/20/12 1:38 PM, H. S. Teoh wrote:
> On Mon, Feb 20, 2012 at 08:23:05PM +0100, deadalnix wrote:
> [...]
>> Why not use tupleof on the Exception instead of Variant[string] ?
>
> +1.
>
> Compile-time type-checking and runtime generic access to fields. Best
> of both worlds. Excellent idea!
Doesn't scale. You need to literally write one catch handler for each
exception type caught.
Andrei
More information about the Digitalmars-d
mailing list