From: jprocter Date: Fri, 29 Aug 2008 11:02:29 +0000 (+0000) Subject: pass OutOfMemory errors upstream from EBI fetch client X-Git-Tag: Release_2_4_0~10 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4e5df4ede3c4ee5918f8b967c1595982865e9b5f;p=jalview.git pass OutOfMemory errors upstream from EBI fetch client --- diff --git a/src/jalview/ws/ebi/EBIFetchClient.java b/src/jalview/ws/ebi/EBIFetchClient.java index 683f465..4fc0900 100644 --- a/src/jalview/ws/ebi/EBIFetchClient.java +++ b/src/jalview/ws/ebi/EBIFetchClient.java @@ -119,9 +119,10 @@ public class EBIFetchClient } - public File fetchDataAsFile(String ids, String f, String s) + public File fetchDataAsFile(String ids, String f, String s) throws OutOfMemoryError { String[] data = fetchData(ids, f, s); + // TODO: after JV 2.4 - test data==null and pass error(s) back up if possible (OutOfMemoryErrors are usual problem) File outFile = null; try { @@ -150,7 +151,7 @@ public class EBIFetchClient * * @return Raw string array result of query set */ - public String[] fetchData(String ids, String f, String s) + public String[] fetchData(String ids, String f, String s) throws OutOfMemoryError { // Need to split // ids of the form uniprot:25KD_SARPE;ADHR_DROPS; @@ -183,7 +184,7 @@ public class EBIFetchClient return fetchBatch(querystring.toString(), db, f, s); } - public String[] fetchBatch(String ids, String db, String f, String s) + public String[] fetchBatch(String ids, String db, String f, String s) throws OutOfMemoryError { // max 50 ids can be added at one time try @@ -214,10 +215,12 @@ public class EBIFetchClient } catch (OutOfMemoryError er) { + System.out.println("OUT OF MEMORY DOWNLOADING QUERY FROM " + db + ":\n" + ids); + throw er; } - return null; + // return null; } catch (Exception ex) {