Modify

Opened 2 years ago

Closed 2 years ago

#22880 closed enhancement (fixed)

[patch] Use a single log entry for MapCSS error logging

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    }

Attachments (0)

Change History (2)

comment:1 by gaben, 2 years ago

Description: modified (diff)

comment:2 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In 18712/josm:

Fix #22880: Use a single log entry for MapCSS error logging (patch by gaben)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.