Set job status to FAILED when an exception occurs.

This change sets the current job status to FAILED when an exception
happens.  This change was made so a job can be requeued after failure
(jobs that end successfully/with an OK status can not be requeued).