Changeset 8782 in josm
- Timestamp:
- 2015-09-22T19:45:32+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java
r8764 r8782 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.io; 3 4 import java.io.InputStream; 3 5 4 6 import org.openstreetmap.josm.data.Bounds; … … 80 82 81 83 @Override 84 protected InputStream getInputStreamRaw(String urlStr, ProgressMonitor progressMonitor, String reason, 85 boolean uncompressAccordingToContentDisposition) throws OsmTransferException { 86 try { 87 return super.getInputStreamRaw(urlStr, progressMonitor, reason, uncompressAccordingToContentDisposition); 88 } catch (OsmApiException ex) { 89 final String errorIndicator = "Error</strong>: "; 90 if (ex.getMessage() != null && ex.getMessage().contains(errorIndicator)) { 91 final String errorPlusRest = ex.getMessage().split(errorIndicator)[1]; 92 if (errorPlusRest != null) { 93 final String error = errorPlusRest.split("</")[0]; 94 ex.setErrorHeader(error); 95 } 96 } 97 throw ex; 98 } 99 } 100 101 @Override 82 102 public DataSet parseOsm(ProgressMonitor progressMonitor) throws OsmTransferException { 83 103
Note:
See TracChangeset
for help on using the changeset viewer.