Allow the option to cache the result when an exception is raised