Warn if out of memory
[jalview.git] / src / jalview / ws / JPredClient.java
index 4302df2..80a66c3 100755 (executable)
@@ -248,6 +248,18 @@ public class JPredClient
           {\r
           }\r
         }\r
+        catch (OutOfMemoryError er)\r
+        {\r
+          jobComplete = true;\r
+          wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);\r
+          JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+                                                "Out of memory handling result!!"\r
+                                                +\r
+              "\nSee help files for increasing Java Virtual Machine memory."\r
+                                                , "Out of memory",\r
+                                                JOptionPane.WARNING_MESSAGE);\r
+          System.out.println("JPredClient: "+er);\r
+        }\r
       }\r
       if (result!=null)\r
         if (! (result.isJobFailed() || result.isServerError()))\r