}\r
}\r
}\r
-\r
- if (! (result.isJobFailed() || result.isServerError()))\r
- {\r
- wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_OK);\r
- }\r
- else\r
- {\r
- wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);\r
- }\r
+ if (result!=null)\r
+ if (! (result.isJobFailed() || result.isServerError()))\r
+ {\r
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_OK);\r
+ }\r
+ else\r
+ {\r
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);\r
+ }\r
}\r
\r
void StartJob()\r
catch (Exception e)\r
{\r
wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);\r
- allowedServerExceptions = 0;\r
- jobComplete = false;\r
-\r
- wsInfo.appendProgressText("Failed to submit the prediction.\n"\r
- +\r
- "It is most likely that there is a problem with the server.\n"\r
- + "Just close the window\n");\r
+ allowedServerExceptions = -1;\r
+ jobComplete = true;\r
+\r
+ wsInfo.setProgressText("Failed to submit the prediction. (Just close the window)\n"\r
+ + ((e.getMessage().indexOf("Exception")>-1) ? (\r
+ "It is most likely that there is a problem with the server.\n")\r
+ : e.getMessage())\r
+ +wsInfo.getProgressText());\r
System.err.println(\r
- "JPredWS Client: Failed to submit the prediction (Probably a server error - see below)\n" +\r
- e.toString() + "\n");\r
+ "JPredWS Client: Failed to submit the prediction (Possibly a server error - see below)\n" +\r
+ e.getMessage() + "\n");\r
\r
jalview.bin.Jalview.log.debug("Failed Submission",e);\r
}\r