JAL-1355
[jalview.git] / src / jalview / datamodel / AlignmentView.java
index 6c4cfae..efb7c4a 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.datamodel;
 
+import jalview.util.MessageManager;
 import jalview.util.ShiftList;
 
 import java.io.PrintStream;
@@ -241,8 +242,7 @@ public class AlignmentView
   {
     if (!seqcigararray.isSeqCigarArray())
     {
-      throw new Error(
-              "Implementation Error - can only make an alignment view from a CigarArray of sequences.");
+      throw new Error(MessageManager.getString("error.implementation_error_can_only_make_alignmnet_from_cigararray"));
     }
     // contigs = seqcigararray.applyDeletions();
     contigs = seqcigararray.getDeletedRegions();
@@ -652,7 +652,7 @@ public class AlignmentView
   {
     if (sequences == null || width <= 0)
     {
-      throw new Error("empty view cannot be updated.");
+      throw new Error(MessageManager.getString("error.empty_view_cannot_be_updated"));
     }
     if (nvismsa == null)
     {
@@ -682,11 +682,7 @@ public class AlignmentView
               j++;
               if (mseq.length != sequences.length)
               {
-                throw new Error(
-                        "Mismatch between number of sequences in block "
-                                + j + " (" + mseq.length
-                                + ") and the original view ("
-                                + sequences.length + ")");
+                throw new Error(MessageManager.formatMessage("error.mismatch_between_number_of_sequences_in_block", new String[]{Integer.valueOf(j).toString(),Integer.valueOf(mseq.length).toString(),Integer.valueOf(sequences.length).toString() }));
               }
               swidth = mseq[0].getLength(); // JBPNote: could ensure padded
               // here.
@@ -839,7 +835,7 @@ public class AlignmentView
               else
               {
                 // place gaps.
-                throw new Error("Padding not yet implemented.");
+                throw new Error(MessageManager.getString("error.padding_not_yet_implemented"));
               }
             }
           }
@@ -852,9 +848,7 @@ public class AlignmentView
     {
       if (nvismsa.length != 1)
       {
-        throw new Error(
-                "Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks="
-                        + nvismsa.length);
+        throw new Error(MessageManager.formatMessage("error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view", new String[]{Integer.valueOf(nvismsa.length).toString()}));
       }
       if (nvismsa[0] != null)
       {