Specify exception that needs to be thrown