From: jprocter Date: Thu, 16 Sep 2010 11:54:27 +0000 (+0000) Subject: reflect the state of a failed Job in the GUI (e.g. trying to align protein seqs with... X-Git-Tag: Release_2_6~35 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8dda9abb8a38e6eea1ce93a7d746221d2cf59adf;p=jalview.git reflect the state of a failed Job in the GUI (e.g. trying to align protein seqs with a nucleotide parameter set) --- diff --git a/src/jalview/ws/jws2/MsaWSThread.java b/src/jalview/ws/jws2/MsaWSThread.java index 79ffa90..d2b4ce9 100644 --- a/src/jalview/ws/jws2/MsaWSThread.java +++ b/src/jalview/ws/jws2/MsaWSThread.java @@ -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(); } }