Changeset 1670 in josm for trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java
- Timestamp:
- 15.06.2009 20:22:46 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java
r1647 r1670 17 17 18 18 import org.openstreetmap.josm.Main; 19 import org.openstreetmap.josm.io.OsmTransferException; 19 20 import org.xml.sax.SAXException; 20 21 … … 109 110 x.printStackTrace(); 110 111 errorMessage = x.getMessage(); 112 } catch(OsmTransferException x) { 113 x.printStackTrace(); 114 if (x.getCause() != null) { 115 errorMessage = x.getCause().getMessage(); 116 } else { 117 errorMessage = x.getMessage(); 118 } 111 119 } finally { 112 120 closeDialog(); … … 134 142 * is called. finish() is called in any case. 135 143 */ 136 protected abstract void realRun() throws SAXException, IOException ;144 protected abstract void realRun() throws SAXException, IOException, OsmTransferException; 137 145 138 146 /** … … 158 166 Main.pleaseWaitDlg.dispose(); 159 167 } 160 if (errorMessage != null && !silent) 168 if (errorMessage != null && !silent) { 161 169 JOptionPane.showMessageDialog(Main.parent, errorMessage); 170 } 162 171 } 163 172 }; 164 173 165 174 // make sure, this is called in the dispatcher thread ASAP 166 if (EventQueue.isDispatchThread()) 175 if (EventQueue.isDispatchThread()) { 167 176 runnable.run(); 168 else177 } else { 169 178 EventQueue.invokeAndWait(runnable); 179 } 170 180 171 181 } catch (InterruptedException e) {
Note: See TracChangeset
for help on using the changeset viewer.
