if(job.getExitCode() != 0 || jobStatus == GramJob.STATUS_FAILED){
int errCode = listener.getError();
String errorMsg = "Job " + job.getID() + " on host " + host.getHostAddress() + " Job Exit Code = "
+ listener.getError();
JobSubmissionFault error = new JobSubmissionFault(this, new Exception(errorMsg), "GFAC HOST",
gateKeeper, job.getRSL(),invocationContext);
errorReason(errCode, error);
invocationContext.getExecutionContext().getNotifier().executionFail(invocationContext,error,errorMsg);
throw error;
}
} catch (GramException e) {
JobSubmissionFault error = new JobSubmissionFault(this, e, host.getHostAddress(), gateKeeper, job.getRSL(), invocationContext);
int errCode = listener.getError();
error.sendFaultNotification(error.getMessage(),invocationContext,error,host.getHostAddress()+ "," + job.getRSL());
throw errorReason(errCode, error);
} catch (GSSException e) {
throw new ProviderException(e.getMessage(), e, invocationContext);
} catch (InterruptedException e) {
throw new ProviderException("Thread", e,invocationContext);