The Right Approach to Exceptions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Feb 20 09:12:17 PST 2012


On 2/20/12 11:08 AM, Mafi wrote:
> If it's supposed to be simple factorization, then you should replace
> "throw r" with "return r". Then the name of that function doesn't make
> much sense anymore. But then you can better search for throw in user
> code and the stack traces aren't obfuscated anymore.
>
> throw createEx!AcmeException("....");

I think that's a great idea, thanks.

Andrei




More information about the Digitalmars-d mailing list