The Right Approach to Exceptions

Martin Nowak dawg at
Tue Feb 21 15:01:37 PST 2012

On Tue, 21 Feb 2012 23:29:32 +0100, H. S. Teoh <hsteoh at>  

> On Tue, Feb 21, 2012 at 03:15:19PM -0600, Andrei Alexandrescu wrote:
> [...]
>> A more debatable aspect of exceptions is the first-match rule in
>> catch blocks. All of OOP goes with best match, except here. But then
>> all code is together so the effect is small.
> Does it make sense to make it best-match? Or is that too risky since
> everyone expects it to be first-match?
Catch statements that are not in best-match order are a compile time  
error, g++ does that as a warning too.

More information about the Digitalmars-d mailing list