JAL-1355
[jalview.git] / src / jalview / io / StockholmFile.java
index 9d21a40..0a18be0 100644 (file)
@@ -33,6 +33,7 @@ import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.util.Format;
+import jalview.util.MessageManager;
 
 import java.io.BufferedReader;
 import java.io.FileReader;
@@ -197,8 +198,7 @@ public class StockholmFile extends AlignFile
     r = new Regex("# STOCKHOLM ([\\d\\.]+)");
     if (!r.search(nextLine()))
     {
-      throw new IOException(
-              "This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM'");
+      throw new IOException(MessageManager.getString("exception.stockholm_invalid_format"));
     }
     else
     {
@@ -416,7 +416,7 @@ public class StockholmFile extends AlignFile
         if (!x.search(line))
         {
           // logger.error("Could not parse sequence line: " + line);
-          throw new IOException("Could not parse sequence line: " + line);
+          throw new IOException(MessageManager.formatMessage("exception.couldnt_parse_sequence_line", new String[]{line}));
         }
         String ns = (String) seqs.get(x.stringMatched(1));
         if (ns == null)
@@ -528,7 +528,7 @@ public class StockholmFile extends AlignFile
           }
           else
           {
-            throw new IOException("Error parsing " + line);
+            throw new IOException(MessageManager.formatMessage("exception.error_parsing_line", new String[]{line}));
           }
         }
         else if (annType.equals("GC"))
@@ -653,8 +653,7 @@ public class StockholmFile extends AlignFile
         }
         else
         {
-          throw new IOException("Unknown annotation detected: " + annType
-                  + " " + annContent);
+          throw new IOException(MessageManager.formatMessage("exception.unknown_annotation_detected", new String[]{annType,annContent}));
         }
       }
     }