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
Previous text:
2003-10-01 21:00: Subject: Re: throw or return
I didn't say I wanted that syntax. It just looks very clumsy to look at the presence of constants in an object. E.g. it could be nice to categorize errors into system errors, c-level errors and pike errors, and then be able to catch only pike-level errors. One could have native-pike-module, application-specific-module and application as further clustering of the pike errors as well. To be able to use expressions like (e->level < APPLICATION_MODULE_LEVEL) would simplify things.
/ Martin Nilsson (saturator)