Skip to content
Snippets Groups Projects
Commit 0740c8b7 authored by gmantele's avatar gmantele
Browse files

[UWS] Change phase to ERROR when a JobThread can not be created while starting a job.

parent 6f607bc6
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,7 @@ import uws.service.log.UWSLog.LogLevel;
* </ul>
*
* @author Gr&eacute;gory Mantelet (CDS;ARI)
* @version 4.1 (10/2014)
* @version 4.1 (11/2014)
*/
public class UWSJob extends SerializableUWSObject {
private static final long serialVersionUID = 1L;
......@@ -1151,9 +1151,14 @@ public class UWSJob extends SerializableUWSObject {
}// Otherwise start directly the execution:
else{
// Create its corresponding thread:
try{
thread = getFactory().createJobThread(this);
if (thread == null)
throw new NullPointerException("Missing job work ! The thread created by the factory is NULL => The job can't be executed !");
}catch(UWSException ue){
setPhase(ExecutionPhase.ERROR);
throw ue;
}
// Change the job phase:
setPhase(ExecutionPhase.EXECUTING);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment