Handle an error.