The Right Approach to Exceptions
Nick Sabalausky
a at a.a
Sat Feb 18 17:28:13 PST 2012
"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
news:jhos0l$102t$1 at digitalmars.com...
> There's a discussion that started in a pull request:
>
> https://github.com/alexrp/phobos/commit/4b87dcf39efeb4ddafe8fe99a0ef9a529c0dcaca
>
What the hell...? It says "5 notes on commit", but only 2 are shown (both by
alexrp). (And yes, that's with a modern browser with JS on.)
> From experience I humbly submit that catching by type is most of the time
> useless.
>
Another one for the file of "Crazy shit Andrei says" ;)
>From experience, I (and clearly many others here) find a sparse, flat
exception hierarchy to be problematic and limiting. But even with a rich
detailed exception hierarchy, those (ie, Andrei) who want to limit
themselves to catching course-grained exceptions can do so, thanks to the
nature of subtyping. So why are we even discussing this?
More information about the Digitalmars-d
mailing list