Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7416)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7417)
@@ -52,4 +52,5 @@
 import org.openstreetmap.josm.gui.preferences.validator.ValidatorTagCheckerRulesPreference;
 import org.openstreetmap.josm.io.CachedFile;
+import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.UTFInputStreamReader;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
@@ -195,5 +196,5 @@
         }
 
-        static TagCheck ofMapCSSRule(final GroupedMapCSSRule rule) {
+        static TagCheck ofMapCSSRule(final GroupedMapCSSRule rule) throws IllegalDataException {
             final TagCheck check = new TagCheck(rule);
             boolean containsSetClassExpression = false;
@@ -244,12 +245,12 @@
                         check.assertions.put(val, false);
                     } else {
-                        throw new RuntimeException("Cannot add instruction " + ai.key + ": " + ai.val + "!");
+                        throw new IllegalDataException("Cannot add instruction " + ai.key + ": " + ai.val + "!");
                     }
                 }
             }
             if (check.errors.isEmpty() && !containsSetClassExpression) {
-                throw new RuntimeException("No "+POSSIBLE_THROWS+" given! You should specify a validation error message for " + rule.selectors);
+                throw new IllegalDataException("No "+POSSIBLE_THROWS+" given! You should specify a validation error message for " + rule.selectors);
             } else if (check.errors.size() > 1) {
-                throw new RuntimeException("More than one "+POSSIBLE_THROWS+" given! You should specify a single validation error message for " + rule.selectors);
+                throw new IllegalDataException("More than one "+POSSIBLE_THROWS+" given! You should specify a single validation error message for " + rule.selectors);
             }
             return check;
@@ -281,6 +282,10 @@
             List<TagCheck> result = new ArrayList<>();
             for (Map.Entry<Declaration, List<Selector>> map : g.entrySet()) {
-                result.add(TagCheck.ofMapCSSRule(
-                        new GroupedMapCSSRule(map.getValue(), map.getKey())));
+                try {
+                    result.add(TagCheck.ofMapCSSRule(
+                            new GroupedMapCSSRule(map.getValue(), map.getKey())));
+                } catch (IllegalDataException e) {
+                    Main.error("Cannot add MapCss rule: "+e.getMessage());
+                }
             }
             return result;
Index: trunk/src/org/openstreetmap/josm/io/IllegalDataException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/IllegalDataException.java	(revision 7416)
+++ trunk/src/org/openstreetmap/josm/io/IllegalDataException.java	(revision 7417)
@@ -2,21 +2,37 @@
 package org.openstreetmap.josm.io;
 
-public class IllegalDataException extends Exception{
+/**
+ * Generic exception raised when illegal data is read.
+ * @since 2070
+ */
+public class IllegalDataException extends Exception {
 
-    public IllegalDataException() {
-        super();
-    }
-
+    /**
+     * Constructs a new {@code IllegalDataException}.
+     * @param message the detail message (which is saved for later retrieval
+     *         by the {@link #getMessage()} method).
+     * @param cause the cause (which is saved for later retrieval by the
+     *         {@link #getCause()} method).
+     */
     public IllegalDataException(String message, Throwable cause) {
         super(message, cause);
     }
 
+    /**
+     * Constructs a new {@code IllegalDataException}.
+     * @param message the detail message (which is saved for later retrieval
+     *         by the {@link #getMessage()} method).
+     */
     public IllegalDataException(String message) {
         super(message);
     }
 
+    /**
+     * Constructs a new {@code IllegalDataException}.
+     * @param cause the cause (which is saved for later retrieval by the
+     *         {@link #getCause()} method).
+     */
     public IllegalDataException(Throwable cause) {
         super(cause);
     }
-
 }
