From 8dda9abb8a38e6eea1ce93a7d746221d2cf59adf Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 16 Sep 2010 11:54:27 +0000 Subject: [PATCH] reflect the state of a failed Job in the GUI (e.g. trying to align protein seqs with a nucleotide parameter set) --- src/jalview/ws/jws2/MsaWSThread.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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(); } } -- 1.7.10.2