Modify

Opened 3 years ago

Last modified 3 years ago

#11277 new enhancement

Show the line number for syntax errors in preset files

Reported by: Dakon Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: template_report, debug Cc:

Description (last modified by Klumbumbus)

What steps will reproduce the problem?

  1. Create a custom MapCSS XML preset file with syntax error
  2. activate it in JOSM
  3. the error is printed, but no hint where in the file it is

What is the expected result?

A easy way to identify the exact point of the error should be printed, preferably the line number, or the XML hierarchy to the object.

What happens instead?

Only the direct anchestor node is shown, which can occur multiple times in the preset.

Please provide any additional information below. Attach a screenshot if possible.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-03-30 01:30:55
Last Changed Author: stoecker
Revision: 8159
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-03-29 14:37:50 +0200 (Sun, 29 Mar 2015)
Last Changed Rev: 8159

Identification: JOSM/1.5 (8159 de) Linux openSUSE 13.1 (Bottle) (x86_64)
Memory Usage: 407 MB / 910 MB (315 MB allocated, but free)
Java version: 1.7.0_55, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: java-1_7_0-openjdk:x86_64-1.7.0.55

Plugins:
- OpeningHoursEditor (30962)
- buildings_tools (30955)
- geochat (31056)
- imagery_offset_db (31056)
- jna (30892)
- log4j (30892)
- native_password_manager (31061)
- osmarender (30892)
- pbf (31010)
- poly (31056)
- public_transport (30892)
- reverter (30990)
- terracer (30892)
- undelete (30892)
- utilsplugin2 (31040)

Attachments (0)

Change History (8)

comment:1 Changed 3 years ago by skyper

Please, start josm from a terminal and you get the line numbers.

comment:2 Changed 3 years ago by Klumbumbus

you can check in the console or in the mappaint dialog by right clicking on the mappaint style and then choose info and errors Help/Dialog/MapPaint

comment:3 Changed 3 years ago by Dakon

On a terminal that is all I get (German version):

Fehler: Defekte Objektvorlage "maxspeed:tilting-Maxspeed of Used by tilting trains (km/h)" - Anzahl der Datenworte in 'display_values' und in 'values' müssen gleich sein

This is exactly where I'm looking at, since in mappaint dialog no errors of presets are shown.

comment:4 in reply to:  3 Changed 3 years ago by Klumbumbus

Replying to Dakon:

in mappaint dialog no errors of presets are shown.

Yes, mappaint styles and presets are two different completely independent things. I thought you are talking about mappaint styles because you said "mapcss".

You're right the position of a preset syntax error is not printed in the console even in debug mode.

comment:5 Changed 3 years ago by Klumbumbus

Description: modified (diff)

comment:6 Changed 3 years ago by Klumbumbus

Keywords: debug added

comment:7 Changed 3 years ago by simon04

Type: defectenhancement

comment:8 in reply to:  1 Changed 3 years ago by skyper

Replying to skyper:

Please, start josm from a terminal and you get the line numbers.

Sorry, it is only the tagging-preset-tester plugin which tells you the line and character, atm.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to Dakon
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.