do we need to be clearer about the behaviour around exception subclasses here? e.g. something like "if ex_type is provided, fail unless (a subclass of) ex_type is thrown"?