added a quieter bailout for cases when the featuresFile is really not going to manage...
authorjprocter <Jim Procter>
Wed, 31 Oct 2007 17:37:59 +0000 (17:37 +0000)
committerjprocter <Jim Procter>
Wed, 31 Oct 2007 17:37:59 +0000 (17:37 +0000)
src/jalview/io/FeaturesFile.java

index 78e796e..3c8ad21 100755 (executable)
@@ -214,8 +214,15 @@ public class FeaturesFile
           {\r
             desc = st.nextToken();\r
           }\r
-\r
+          if (!st.hasMoreTokens())\r
+          {\r
+            System.err.println("DEBUG: Run out of tokens when trying to identify the destination for the feature.. giving up.");\r
+            // in all probability, this isn't a file we understand, so bail quietly.\r
+            return false;\r
+          }\r
+          \r
           token = st.nextToken();\r
+          \r
           if (!token.equals("ID_NOT_SPECIFIED"))\r
           {\r
             seq = align.findName(token);\r