From 425d77e906364ec4284762a2da17c46add8022ba Mon Sep 17 00:00:00 2001 From: gmantele <gmantele@ari.uni-heidelberg.de> Date: Thu, 13 Nov 2014 11:32:26 +0100 Subject: [PATCH] [UWS] Cancel last commit. The UWSException was thrown intentionnaly: if an error occurs while just creating the thread, this error should not impact the job ; it is an internal server error, not an error due to the job execution or of a wrong parameter. This error MUST be thrown AND the job MUST stay PENDING (so that it can be restarted later when the server bug will be fixed). Job parameters checks MUST be done either in the job execution (JobThread.jobWork()) or at the job creation (using an InputParamController). --- src/uws/job/UWSJob.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/uws/job/UWSJob.java b/src/uws/job/UWSJob.java index b714f19..735558d 100644 --- a/src/uws/job/UWSJob.java +++ b/src/uws/job/UWSJob.java @@ -119,7 +119,7 @@ import uws.service.log.UWSLog.LogLevel; * </ul> * * @author Grégory Mantelet (CDS;ARI) - * @version 4.1 (11/2014) + * @version 4.1 (10/2014) */ public class UWSJob extends SerializableUWSObject { private static final long serialVersionUID = 1L; @@ -1151,14 +1151,9 @@ 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; - } + 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 !"); // Change the job phase: setPhase(ExecutionPhase.EXECUTING); -- GitLab