From: jprocter Date: Thu, 15 Sep 2005 11:16:12 +0000 (+0000) Subject: Fixed so job submission and job failure errors are reported to user and server except... X-Git-Tag: Release_2_05b~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1a3a814fb893d185deeaaaf694fbb91488b2bff4;p=jalview.git Fixed so job submission and job failure errors are reported to user and server exceptions also generate error and log messages. --- diff --git a/src/jalview/ws/JPredClient.java b/src/jalview/ws/JPredClient.java index 9fe7e27..45e331a 100755 --- a/src/jalview/ws/JPredClient.java +++ b/src/jalview/ws/JPredClient.java @@ -304,20 +304,30 @@ public class JPredClient } catch (Exception e) { - wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR); + if (e.getMessage().indexOf("Exception")>-1) { + wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR); + wsInfo.setProgressText( + "Failed to submit the prediction. (Just close the window)\n" + + + "It is most likely that there is a problem with the server.\n"); + System.err.println( + "JPredWS Client: Failed to submit the prediction. Quite possibly because of a server error - see below)\n" + + e.getMessage() + "\n"); + + jalview.bin.Cache.log.warn("Server Exception",e); + } else { + wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR); + // JBPNote - this could be a popup informing the user of the problem. + wsInfo.setProgressText("Failed to submit the prediction:\n" + +e.getMessage()+ + wsInfo.getProgressText()); + + jalview.bin.Cache.log.debug("Failed Submission",e); + + } allowedServerExceptions = -1; jobComplete = true; - wsInfo.setProgressText("Failed to submit the prediction. (Just close the window)\n" - + ((e.getMessage().indexOf("Exception")>-1) ? ( - "It is most likely that there is a problem with the server.\n") - : e.getMessage()) - +wsInfo.getProgressText()); - System.err.println( - "JPredWS Client: Failed to submit the prediction (Possibly a server error - see below)\n" + - e.getMessage() + "\n"); - - jalview.bin.Cache.log.debug("Failed Submission",e); } }