Opened 3 years ago

Last modified 3 years ago

#22880 closed enhancement

[patch] Use a single log entry for MapCSS error logging — at Version 1

Reported by: gaben Owned by: team
Priority: trivial Milestone: 23.04
Component: Core Version:
Keywords: mapcss log error_handling Cc:

Description (last modified by gaben)

I noticed the issue when the edited MapCSS rule was invalid, see status report of #22878.

So instead

Last errors/warnings:
- 00019.987 E: Skipping to the next rule, because of an error:
- 00019.988 E: org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException: Encountered " ":" ": "" at line 98, column 9.
Last errors/warnings:
- 00019.987 E: Skipping to the next rule, because of an error: org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException: Encountered " ":" ": "" at line 98, column 9.

should be printed.


The following patch fixes the above.

  • src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj

     
    11621162        e = new ParseException(pe.getMessage()); // prevent memory leak
    11631163    }
    11641164   
    1165     Logging.error("Skipping to the next rule, because of an error:");
    1166     Logging.error(e);
     1165    Logging.error("Skipping to the next rule, because of an error: " + e);
    11671166    if (sheet != null) {
    11681167        sheet.logError(e);
    11691168    }

Change History (1)

comment:1 by gaben, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.