JAL-1355
[jalview.git] / src / jalview / io / JnetAnnotationMaker.java
index dabd8ca..5c95a3f 100755 (executable)
@@ -21,6 +21,7 @@
 package jalview.io;
 
 import jalview.datamodel.*;
+import jalview.util.MessageManager;
 
 public class JnetAnnotationMaker
 {
@@ -60,13 +61,12 @@ public class JnetAnnotationMaker
     if ((delMap != null && delMap.length > width)
             || (delMap == null && gapmap.length != width))
     {
-      throw (new Exception("Number of residues in "
-              + (delMap == null ? "" : " mapped ")
-              + "supposed query sequence ('"
-              + al.getSequenceAt(firstSeq).getName() + "'\n"
-              + al.getSequenceAt(firstSeq).getSequenceAsString()
-              + ")\ndiffer from number of prediction sites in prediction ("
-              + width + ")"));
+      throw (new Exception(MessageManager.formatMessage("exception.number_of_residues_in_query_sequence_differ_from_prediction", new String[]{
+                 (delMap == null ? "" : MessageManager.getString("label.mapped")),
+                 al.getSequenceAt(firstSeq).getName(),
+                 al.getSequenceAt(firstSeq).getSequenceAsString(),
+                 Integer.valueOf(width).toString()
+      })));
     }
 
     AlignmentAnnotation annot;