Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 8574)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 8575)
@@ -130,6 +130,6 @@
             osm.mappaintStyle = style.put(p.a, p.b);
         } catch (StyleCache.RangeViolatedError e) {
-            throw new AssertionError("Range violated. object: " + osm.getPrimitiveId() + ", current style: "+osm.mappaintStyle
-                    + ", scale: " + scale + ", new stylelist: " + p.a + ", new range: " + p.b, e);
+            throw new AssertionError("Range violated: " + e.getMessage() + " (object: " + osm.getPrimitiveId() + ", current style: "+osm.mappaintStyle
+                    + ", scale: " + scale + ", new stylelist: " + p.a + ", new range: " + p.b + ")", e);
         }
         osm.mappaintCacheIdx = cacheIdx;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 8574)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 8575)
@@ -148,4 +148,10 @@
     // by AssertionError
     public static class RangeViolatedError extends Error {
+        public RangeViolatedError() {
+        }
+
+        public RangeViolatedError(String message) {
+            super(message);
+        }
     }
 
@@ -167,7 +173,7 @@
         if (bd.get(i) == lower) {
             if (upper > bd.get(i+1))
-                throw new RangeViolatedError();
+                throw new RangeViolatedError("the new range must be within a single subrange (1)");
             if (data.get(i) != null)
-                throw new AssertionError("the new range must be within a subrange that has no data");
+                throw new RangeViolatedError("the new range must be within a subrange that has no data");
 
             if (bd.get(i+1) == upper) {
@@ -186,5 +192,5 @@
         } else {
             if (bd.get(i) < upper)
-                throw new AssertionError("the new range must be within a single subrange");
+                throw new RangeViolatedError("the new range must be within a single subrange (2)");
             if (data.get(i-1) != null)
                 throw new AssertionError();
