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 2010/02/04 10:26:36 UTC

svn commit: r906414 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/Slider.java

Author: noelgrandin
Date: Thu Feb  4 09:26:35 2010
New Revision: 906414

URL: http://svn.apache.org/viewvc?rev=906414&view=rev
Log:
add more useful information when throwing IllegalStateException

Modified:
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Slider.java

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Slider.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Slider.java?rev=906414&r1=906413&r2=906414&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Slider.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Slider.java Thu Feb  4 09:26:35 2010
@@ -90,7 +90,7 @@
 
     public void setRange(int start, int end) {
         if (start > end) {
-            throw new IllegalArgumentException("start is greater than maximum.");
+            throw new IllegalArgumentException("start " + start + " is greater than maximum " + end + ".");
         }
 
         int previousStart = this.start;
@@ -148,11 +148,11 @@
 
     public void setValue(int value) {
         if (value < start) {
-            throw new IllegalArgumentException("value is less than minimum.");
+            throw new IllegalArgumentException("value " + value + " is less than minimum " + start + ".");
         }
 
         if (value > end) {
-            throw new IllegalArgumentException("value is greater than maximum.");
+            throw new IllegalArgumentException("value " + value + " is greater than maximum " + end + ".");
         }
 
         int previousValue = this.value;