Modify

#7146 closed enhancement (fixed)

Xmlparser needs to give line and column in source where error occurs

Reported by: AM909 Owned by: team
Priority: normal Component: Core
Version: latest Keywords: template_report XML parse error
Cc: AM909

Description

What steps will reproduce the problem?

  1. Specify a presets file that has an XML syntactical or structural error in it.

What is the expected result?

org.openstreetmap.josm.tools.XmlObjectParser() should produce an error message with an understandable description of the problem and, more importantly, the file and location at which the error occurred.

What happens instead?

In r4655, a stack trace, the top line of which is sometimes understandable, but with no information to help locate the error.

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

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-12-12 02:32:15
Last Changed Author: stoecker
Revision: 4655
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-12-11 23:06:22 +0100 (Sun, 11 Dec 2011)
Last Changed Rev: 4655

Identification: JOSM/1.5 (4655 en)
Memory Usage: 49 MB / 742 MB (17 MB allocated, but free)
Java version: 1.6.0_29, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows XP

Plugin: CommandLine (26986)
Plugin: alignways (26986)
Plugin: buildings_tools (26731)
Plugin: ext_tools (26986)
Plugin: openstreetbugs (26986)
Plugin: turnrestrictions (26986)
Plugin: undelete (26928)
Plugin: utilsplugin2 (26986)
Plugin: waydownloader (26986)

java.lang.RuntimeException: org.xml.sax.SAXParseException: cvc-complex-type.2.4.d: Invalid content was found starting with element 'space'. No child element is expected at this point.
	at org.openstreetmap.josm.tools.XmlObjectParser.start(XmlObjectParser.java:296)
	at org.openstreetmap.josm.tools.XmlObjectParser.startWithValidation(XmlObjectParser.java:316)
	at org.openstreetmap.josm.gui.tagging.TaggingPreset.readAll(TaggingPreset.java:1133)
	at org.openstreetmap.josm.gui.tagging.TaggingPreset.readAll(TaggingPreset.java:1200)
	at org.openstreetmap.josm.gui.preferences.TaggingPresetPreference$1.validatePreferences(TaggingPresetPreference.java:85)
	at org.openstreetmap.josm.gui.preferences.PreferenceDialog$OKAction.actionPerformed(PreferenceDialog.j

Attachments (0)

Change History (1)

comment:1 Changed 17 months ago by jttt

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r4726

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.