Ineritance does not have the same expressive power. constants can be redefined, inheritance can not. When this came up originally (a long long time ago, in a galaxy far far away) constants were deemed better because exceptions are not nessesarily easily organized in trees.
/ Fredrik (Naranek) Hubinette (Real Build Master)
Previous text:
2003-10-01 21:37: Subject: Re: throw or return
Who said it should be limited to looking at constants in the error objects (or using inheritance, which has the same expressive power)? I made a point that the catch conditions should be more powerful than that. As for categorizations, constants or a class hierarchy are both well suited to solve that.
/ Martin Stjernholm, Roxen IS