Changeset 8515 in josm


Ignore:
Timestamp:
2015-06-21T12:19:37+02:00 (4 years ago)
Author:
simon04
Message:

see #11579 - MapCSS: improve error reporting on invalid pseudo classes

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java

    r8514 r8515  
    500500                return new PseudoClassCondition(method, not);
    501501            }
    502             throw new IllegalArgumentException("Invalid pseudo class specified: " + id);
     502            throw new MapCSSException("Invalid pseudo class specified: " + id);
    503503        }
    504504
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj

    r8510 r8515  
    3636import org.openstreetmap.josm.tools.ColorHelper;
    3737import org.openstreetmap.josm.tools.Pair;
     38import org.openstreetmap.josm.tools.Utils;
    3839
    3940/**
     
    11451146
    11461147    if (me != null) {
    1147         me.setLine(pe.currentToken.next.beginLine);
    1148         me.setColumn(pe.currentToken.next.beginColumn);
     1148        final Token token = Utils.firstNonNull(pe.currentToken.next, pe.currentToken);
     1149        me.setLine(token.beginLine);
     1150        me.setColumn(token.beginColumn);
    11491151        e = me;
    11501152    } else {
Note: See TracChangeset for help on using the changeset viewer.