Replacing generic Exception with Exception subclasses