diff --git a/src/org/openstreetmap/josm/io/OsmReader.java b/src/org/openstreetmap/josm/io/OsmReader.java
index 43bd83c8b6..632e70c74a 100644
a
|
b
|
public class OsmReader extends AbstractReader {
|
201 | 201 | } |
202 | 202 | } |
203 | 203 | |
| 204 | private void parseError() throws XMLStreamException { |
| 205 | while (parser.hasNext()) { |
| 206 | int event = parser.next(); |
| 207 | if (event == XMLStreamConstants.CHARACTERS) { |
| 208 | throwException(parser.getText()); |
| 209 | } else if (event == XMLStreamConstants.END_ELEMENT) { |
| 210 | return; |
| 211 | } else { |
| 212 | throwException("Unknown error element type"); |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | |
204 | 217 | private void parseRemark() throws XMLStreamException { |
205 | 218 | while (parser.hasNext()) { |
206 | 219 | int event = parser.next(); |
… |
… |
public class OsmReader extends AbstractReader {
|
393 | 406 | if (printWarning && ("note".equals(element) || "meta".equals(element))) { |
394 | 407 | // we know that Overpass API returns those elements |
395 | 408 | Logging.debug(tr("Undefined element ''{0}'' found in input stream. Skipping.", element)); |
| 409 | } else if ("error".equals(element)) { |
| 410 | parseError(); |
396 | 411 | } else if (printWarning) { |
397 | 412 | Logging.info(tr("Undefined element ''{0}'' found in input stream. Skipping.", element)); |
398 | 413 | } |