- Timestamp:
- 2019-12-15T10:57:07+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxImporter.java
r15560 r15593 113 113 } catch (SAXException e) { 114 114 Logging.error(e); 115 throw new IOException( tr("Parsing data for layer ''{0}'' failed", fileName), e);115 throw new IOException(e.getLocalizedMessage(), e); 116 116 } 117 117 } -
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r15588 r15593 645 645 if (tryToFinish) { 646 646 parser.tryToFinish(); 647 if (parser.data.isEmpty()) 648 throw e; 649 String message = e.getMessage(); 647 String message = e.getLocalizedMessage(); 650 648 if (e instanceof SAXParseException) { 649 boolean dot = message.lastIndexOf('.') == message.length() - 1; 650 if (dot) 651 message = message.substring(0, message.length() - 1); 651 652 SAXParseException spe = (SAXParseException) e; 652 653 message += ' ' + tr("(at line {0}, column {1})", spe.getLineNumber(), spe.getColumnNumber()); 653 } 654 Logging.warn(message); 654 if (dot) 655 message += '.'; 656 } 657 if (parser.data.creator != null && !parser.data.creator.trim().isEmpty()) { 658 message += "\n" + tr("The file was created by \"{0}\".", parser.data.creator); 659 } 660 SAXException ex = new SAXException(message, e); 661 if (parser.data.isEmpty()) 662 throw ex; 663 Logging.warn(ex); 655 664 return false; 656 665 } else
Note:
See TracChangeset
for help on using the changeset viewer.