1 | Index: src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
|
---|
2 | ===================================================================
|
---|
3 | --- src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java (revision 1826)
|
---|
4 | +++ src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java (working copy)
|
---|
5 | @@ -17,6 +17,7 @@
|
---|
6 | import org.openstreetmap.josm.gui.layer.Layer;
|
---|
7 | import org.openstreetmap.josm.gui.progress.ProgressMonitor;
|
---|
8 | import org.openstreetmap.josm.io.BoundingBoxDownloader;
|
---|
9 | +import org.openstreetmap.josm.io.OsmTransferException;
|
---|
10 | import org.xml.sax.SAXException;
|
---|
11 |
|
---|
12 | public class DownloadGpsTask implements DownloadTask {
|
---|
13 | @@ -33,7 +34,7 @@
|
---|
14 | this.newLayer = newLayer;
|
---|
15 | }
|
---|
16 |
|
---|
17 | - @Override public void realRun() throws IOException, SAXException {
|
---|
18 | + @Override public void realRun() throws IOException, SAXException, OsmTransferException {
|
---|
19 | rawData = reader.parseRawGps(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
|
---|
20 | }
|
---|
21 |
|
---|
22 | Index: src/org/openstreetmap/josm/io/BoundingBoxDownloader.java
|
---|
23 | ===================================================================
|
---|
24 | --- src/org/openstreetmap/josm/io/BoundingBoxDownloader.java (revision 1826)
|
---|
25 | +++ src/org/openstreetmap/josm/io/BoundingBoxDownloader.java (working copy)
|
---|
26 | @@ -39,7 +39,7 @@
|
---|
27 | * contain only one list, since the server cannot distinguish between
|
---|
28 | * ways.
|
---|
29 | */
|
---|
30 | - public GpxData parseRawGps(ProgressMonitor progressMonitor) throws IOException, SAXException {
|
---|
31 | + public GpxData parseRawGps(ProgressMonitor progressMonitor) throws IOException, SAXException,OsmTransferException {
|
---|
32 | progressMonitor.beginTask("", 1);
|
---|
33 | try {
|
---|
34 | progressMonitor.indeterminateSubTask(tr("Contacting OSM Server..."));
|
---|
35 | @@ -78,6 +78,8 @@
|
---|
36 | throw e;
|
---|
37 | } catch (SAXException e) {
|
---|
38 | throw e;
|
---|
39 | + } catch (OsmTransferException e) {
|
---|
40 | + throw e;
|
---|
41 | } catch (Exception e) {
|
---|
42 | if (cancel)
|
---|
43 | return null;
|
---|