Changes between Version 9 and Version 10 of net.sf.basedb.opengrid/using


Ignore:
Timestamp:
Jan 17, 2017, 1:47:16 PM (4 years ago)
Author:
Nicklas Nordborg
Comment:

Updated error handling code in the example for submitting a job

Legend:

Unmodified
Added
Removed
Modified
  • net.sf.basedb.opengrid/using

    v9 v10  
    131131   // Submit the job and do not forget the error handling
    132132   CmdResult<List<JobStatus>> result = session.qsub(dc, Arrays.asList(jobDef));
    133    if (result.getExitStatus() != 0)
    134    {
    135        // Error handling, for example
    136        throw new RuntimeException(result.getStderr());
    137    }
     133   result.throwExceptionIfNonZeroExitStatus();
    138134
    139135   // Do not forget to commit the transaction. The job will be aborted otherwise.