Opened 11 years ago

Last modified 2 years ago

#11277 closed enhancement

Show the line number for syntax errors in preset files — at Version 5

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)

Change History (5)

comment:1 by skyper, 11 years ago

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

comment:2 by Klumbumbus, 11 years ago

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 by Dakon, 11 years ago

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.

in reply to:  3 comment:4 by Klumbumbus, 11 years ago

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 by Klumbumbus, 11 years ago

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