Changeset 7004 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2014-04-26T15:28:16+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java
r6992 r7004 32 32 33 33 /** 34 * Loads a JOSM session 34 * Loads a JOSM session. 35 35 * @since 4668 36 36 */ … … 174 174 } 175 175 } catch (IllegalDataException e) { 176 Main.error(e); 177 HelpAwareOptionPane.showMessageDialogInEDT( 178 Main.parent, 179 tr("<html>Could not load session file ''{0}''.<br>Error is:<br>{1}</html>", uri != null ? uri : file.getName(), e.getMessage()), 180 tr("Data Error"), 181 JOptionPane.ERROR_MESSAGE, 182 null 183 ); 184 cancel(); 176 handleException(tr("Data Error"), e); 185 177 } catch (IOException e) { 186 Main.error(e); 187 HelpAwareOptionPane.showMessageDialogInEDT( 188 Main.parent, 189 tr("<html>Could not load session file ''{0}''.<br>Error is:<br>{1}</html>", uri != null ? uri : file.getName(), e.getMessage()), 190 tr("IO Error"), 191 JOptionPane.ERROR_MESSAGE, 192 null 193 ); 194 cancel(); 178 handleException(tr("IO Error"), e); 195 179 } catch (RuntimeException e) { 196 180 cancel(); … … 201 185 } 202 186 } 187 188 private void handleException(String dialogTitle, Exception e) { 189 Main.error(e); 190 HelpAwareOptionPane.showMessageDialogInEDT( 191 Main.parent, 192 tr("<html>Could not load session file ''{0}''.<br>Error is:<br>{1}</html>", uri != null ? uri : file.getName(), e.getMessage()), 193 dialogTitle, 194 JOptionPane.ERROR_MESSAGE, 195 null 196 ); 197 cancel(); 198 } 203 199 } 204 200 } 205 -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadSessionTask.java
r6643 r7004 5 5 6 6 import java.io.IOException; 7 import java.net.MalformedURLException;8 7 import java.net.URISyntaxException; 9 8 import java.net.URL; … … 54 53 loader = new Loader(Utils.openURL(u), u.toURI(), url.endsWith(".joz")); 55 54 return Main.worker.submit(loader); 56 } catch (URISyntaxException e) { 57 Main.error(e); 58 } catch (MalformedURLException e) { 59 Main.error(e); 60 } catch (IOException e) { 55 } catch (URISyntaxException | IOException e) { 61 56 Main.error(e); 62 57 }
Note:
See TracChangeset
for help on using the changeset viewer.