Merge branch 'Release_2_8_2_Branch_i18n' into Release_2_8_2_Branch
[jalview.git] / src / jalview / binding / Pdbentry.java
index 2ee5c96..9b7c1cf 100644 (file)
@@ -24,6 +24,8 @@ package jalview.binding;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -131,9 +133,11 @@ public class Pdbentry implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._items.size())
     {
-      throw new IndexOutOfBoundsException("getPdbentryItem: Index value '"
-              + index + "' not in range [0.." + (this._items.size() - 1)
-              + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getPdbentryItem",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._items.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.binding.PdbentryItem) _items.get(index);
@@ -286,9 +290,11 @@ public class Pdbentry implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._items.size())
     {
-      throw new IndexOutOfBoundsException("setPdbentryItem: Index value '"
-              + index + "' not in range [0.." + (this._items.size() - 1)
-              + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setPdbentryItem",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._items.size() - 1)).toString()
+          })); 
     }
 
     this._items.set(index, vPdbentryItem);