From: jprocter Date: Wed, 12 Nov 2008 11:10:50 +0000 (+0000) Subject: bugfix to safely deal with server exception resulting in null document X-Git-Tag: Release_2_5~422 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8173f37a48a91f794aeb70f7ea111cb26ba4f83e;p=jalview.git bugfix to safely deal with server exception resulting in null document --- diff --git a/src/jalview/ws/ebi/EBIFetchClient.java b/src/jalview/ws/ebi/EBIFetchClient.java index d5ab2e1..2a13baa 100644 --- a/src/jalview/ws/ebi/EBIFetchClient.java +++ b/src/jalview/ws/ebi/EBIFetchClient.java @@ -124,6 +124,10 @@ public class EBIFetchClient 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) + if (data==null) + { + return null; + } File outFile = null; try { @@ -137,7 +141,8 @@ public class EBIFetchClient index++; } out.close(); - } catch (Exception ex) + } + catch (Exception ex) { } return outFile;