Use a function instead of a generic function to generate the failure instance.