Allow error function to be defined on job that will be executed on final job failure

- define function errorOnPerform($error) on the job object that takes the error message as an argument.
- allows the job object to handle the situation where a job has failed for the final time.