JAL-1355
[jalview.git] / src / jalview / schemabinding / version2 / VAMSAS.java
index 2a7d463..7f0c216 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -156,9 +158,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceSetList.size())
     {
-      throw new IndexOutOfBoundsException("getSequenceSet: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceSetList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getSequenceSet",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList
@@ -205,8 +209,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("getTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getTree",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._treeList.size() - 1)).toString()
+        })); 
     }
 
     return (java.lang.String) _treeList.get(index);
@@ -370,9 +377,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._sequenceSetList.size())
     {
-      throw new IndexOutOfBoundsException("setSequenceSet: Index value '"
-              + index + "' not in range [0.."
-              + (this._sequenceSetList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setSequenceSet",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+          })); 
     }
 
     this._sequenceSetList.set(index, vSequenceSet);
@@ -409,8 +418,11 @@ public class VAMSAS implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._treeList.size())
     {
-      throw new IndexOutOfBoundsException("setTree: Index value '" + index
-              + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setTree",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._treeList.size() - 1)).toString()
+        })); 
     }
 
     this._treeList.set(index, vTree);