Add Error Code check for finished jobs.
Merge pull request #4046 from HassenRiahi/AddErrCodeCheck

Add Error Code check for finished jobs.