I mean, I want to specify that I expect a given error class, instead of specifying the error message. AFAICT this is currently not possible.