From 336b270e68fe281a9a881f751fe850e8a92e05c9 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 31 Oct 2007 17:37:59 +0000 Subject: [PATCH] added a quieter bailout for cases when the featuresFile is really not going to manage to parse the file - consider revoking this in the future if it hinders debugging of features file input to jalview --- src/jalview/io/FeaturesFile.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/jalview/io/FeaturesFile.java b/src/jalview/io/FeaturesFile.java index 78e796e..3c8ad21 100755 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@ -214,8 +214,15 @@ public class FeaturesFile { desc = st.nextToken(); } - + if (!st.hasMoreTokens()) + { + System.err.println("DEBUG: Run out of tokens when trying to identify the destination for the feature.. giving up."); + // in all probability, this isn't a file we understand, so bail quietly. + return false; + } + token = st.nextToken(); + if (!token.equals("ID_NOT_SPECIFIED")) { seq = align.findName(token); -- 1.7.10.2