You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by no...@apache.org on 2011/03/14 14:02:00 UTC
svn commit: r1081356 -
/pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java
Author: noelgrandin
Date: Mon Mar 14 13:02:00 2011
New Revision: 1081356
URL: http://svn.apache.org/viewvc?rev=1081356&view=rev
Log:
add more information to exception error message
Modified:
pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java
Modified: pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java?rev=1081356&r1=1081355&r2=1081356&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java Mon Mar 14 13:02:00 2011
@@ -574,21 +574,21 @@ public class ArrayList<T> implements Lis
private static void verifyIndexBounds(int index, int start, int end) {
if (index < start || index > end) {
- throw new IndexOutOfBoundsException("index " + index + " out of bounds.");
+ throw new IndexOutOfBoundsException("index " + index + " out of bounds [" + start + "," + end + "].");
}
}
private static void verifyIndexBounds(int index, int count, int start, int end) {
if (count < 0) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("count < 0, " + count);
}
if (index < start) {
- throw new IndexOutOfBoundsException("index " + index + " out of bounds.");
+ throw new IndexOutOfBoundsException("index " + index + " out of bounds [" + start + "," + end + "].");
}
if (index + count > end) {
- throw new IndexOutOfBoundsException("index + count " + index + "," + count + " out of range.");
+ throw new IndexOutOfBoundsException("index + count " + index + "," + count + " out of bounds [" + start + "," + end + "].");
}
}
}