- Timestamp:
- 2009-08-29T11:20:57+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
r1989 r2002 37 37 public static void explainOsmApiInitializationException(OsmApiInitializationException e) { 38 38 e.printStackTrace(); 39 OptionPaneUtil.showMessageDialog(39 JOptionPane.showMessageDialog( 40 40 Main.parent, 41 41 tr( "Failed to initialize communication with the OSM server {0}.\n" … … 56 56 public static void explainPreconditionFailed(OsmApiException e) { 57 57 e.printStackTrace(); 58 OptionPaneUtil.showMessageDialog(58 JOptionPane.showMessageDialog( 59 59 Main.parent, 60 60 tr("<html>Uploading to the server <strong>failed</strong> because your current<br>" … … 82 82 } 83 83 e.printStackTrace(); 84 OptionPaneUtil.showMessageDialog(84 JOptionPane.showMessageDialog( 85 85 Main.parent, 86 86 msg, … … 113 113 apiUrl, host 114 114 ); 115 OptionPaneUtil.showMessageDialog(115 JOptionPane.showMessageDialog( 116 116 Main.parent, 117 117 message, … … 137 137 ); 138 138 e.printStackTrace(); 139 OptionPaneUtil.showMessageDialog(139 JOptionPane.showMessageDialog( 140 140 Main.parent, 141 141 message, … … 163 163 ); 164 164 e.printStackTrace(); 165 OptionPaneUtil.showMessageDialog(165 JOptionPane.showMessageDialog( 166 166 Main.parent, 167 167 message, 168 168 tr("IO Exception"), 169 JOptionPane.ERROR_MESSAGE 170 ); 171 } 172 173 /** 174 * Explains a {@see OsmApiException} which was thrown because of an internal server 175 * error in the OSM API server.. 176 * 177 * @param e the exception 178 */ 179 180 public static void explainInternalServerError(OsmTransferException e) { 181 String apiUrl = OsmApi.getOsmApi().getBaseUrl(); 182 String message = tr("<html>The OSM server<br>" 183 + "''{0}''<br>" 184 + "reported an internal server error.<br>" 185 + "This is most likely a temporary problem. Please try again later.</html>", 186 apiUrl 187 ); 188 e.printStackTrace(); 189 JOptionPane.showMessageDialog( 190 Main.parent, 191 message, 192 tr("Internal Server Error"), 169 193 JOptionPane.ERROR_MESSAGE 170 194 ); … … 195 219 ); 196 220 e.printStackTrace(); 197 OptionPaneUtil.showMessageDialog(221 JOptionPane.showMessageDialog( 198 222 Main.parent, 199 223 message, … … 261 285 return; 262 286 } 287 if (oae.getResponseCode() == HttpURLConnection.HTTP_INTERNAL_ERROR) { 288 explainInternalServerError(oae); 289 return; 290 } 263 291 } 264 292 explainGeneric(e); … … 281 309 e.getMessage().replace("&", "&").replace("<", "<").replace(">", ">") 282 310 ); 283 OptionPaneUtil.showMessageDialog(311 JOptionPane.showMessageDialog( 284 312 Main.parent, 285 313 msg,
Note:
See TracChangeset
for help on using the changeset viewer.