From 8173f37a48a91f794aeb70f7ea111cb26ba4f83e Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 12 Nov 2008 11:10:50 +0000 Subject: [PATCH] bugfix to safely deal with server exception resulting in null document --- src/jalview/ws/ebi/EBIFetchClient.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 1.7.10.2