cache the runner config so the preset list can be retrieved quickly
[jalview.git] / src / jalview / ws / jws2 / MsaWSThread.java
index 79ffa90..d2b4ce9 100644 (file)
@@ -710,9 +710,17 @@ class MsaWSThread extends AWS2Thread implements WSClientI
           try
           {
             msjob.alignment = server.getResult(msjob.getJobId());
-          } catch (Exception e)
+          } catch (compbio.metadata.ResultNotAvailableException e)
+          {
+            // job has failed for some reason - probably due to invalid parameters
+            Cache.log.debug("Results not available for finished job - marking as broken job.",e);
+            msjob.setjobStatus(JobStatus.FAILED);
+          }
+            catch (Exception e)
           {
             Cache.log.error("Couldn't get Alignment for job.", e);
+            // TODO: Increment count and retry ?
+            msjob.setjobStatus(JobStatus.UNDEFINED);
           }
         }
         finalState.updateJobPanelState(wsInfo, OutputHeader, jobs[j]);
@@ -763,6 +771,7 @@ class MsaWSThread extends AWS2Thread implements WSClientI
     }
     else
     {
+      wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);
       wsInfo.setFinishedNoResults();
     }
   }