From: jprocter Date: Tue, 29 Jun 2010 09:42:46 +0000 (+0000) Subject: catch OOM earlier * JAL-595 X-Git-Tag: Release_2_6~161 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5fc459887b8b40be7c705456e9ea4e761f8b76ad;p=jalview.git catch OOM earlier * JAL-595 --- diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 34f0e79..7b42a3d 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -416,7 +416,18 @@ public class SequenceFetcher extends JPanel implements Runnable } } - AlignmentI indres = proxy.getSequenceRecords(item); + + AlignmentI indres = null; + try + { + indres = proxy.getSequenceRecords(item); + } catch (OutOfMemoryError oome) + { + new OOMWarning( + "fetching " + item + " from " + + database.getSelectedItem(),oome, + this); + } if (indres != null) { if (aresult == null) @@ -446,7 +457,18 @@ public class SequenceFetcher extends JPanel implements Runnable multiacc.append(proxy.getAccessionSeparator()); } } - aresult = proxy.getSequenceRecords(multiacc.toString()); + try + { + aresult = proxy.getSequenceRecords(multiacc.toString()); + } catch (OutOfMemoryError oome) + { + new OOMWarning( + "fetching " + multiacc + " from " + + database.getSelectedItem(),oome, + this); + } + + } } catch (Exception e)