in reply to Re: switch question
in thread switch question

Maybe your exception classes should implement errorcode()?
I don't want to do that.

I use this exceptions in other places as well where this mapping is irrelevant (or maybe I also need a mapping but a different one) and that in this particular case they are used to generate a return-code is not the concern of the exception-class.