Execute an action if this expected is an error.
this expected, unchanged
Function handling the case when error is present.