Changeset 6643 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2014-01-06T16:39:45+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
r6362 r6643 90 90 */ 91 91 public static void explainGeneric(Exception e) { 92 e.printStackTrace();92 Main.error(e); 93 93 BugReportExceptionHandler.handleException(e); 94 94 } -
trunk/src/org/openstreetmap/josm/gui/FileDrop.java
r6221 r6643 85 85 private static Color defaultBorderColor = new Color( 0f, 0f, 1f, 0.25f ); 86 86 87 /** 88 * Constructor for JOSM file drop 87 /** 88 * Constructor for JOSM file drop 89 89 * @param c The drop target 90 90 */ … … 226 226 catch ( IOException io) 227 227 { Main.warn("FileDrop: IOException - abort:" ); 228 io.printStackTrace();228 Main.error(io); 229 229 evt.rejectDrop(); 230 230 } // end catch IOException 231 231 catch (UnsupportedFlavorException ufe) 232 232 { Main.warn("FileDrop: UnsupportedFlavorException - abort:" ); 233 ufe.printStackTrace();233 Main.error(ufe); 234 234 evt.rejectDrop(); 235 235 } // end catch: UnsupportedFlavorException … … 333 333 } // end try 334 334 catch( TooManyListenersException e ) 335 { e.printStackTrace();335 { Main.error(e); 336 336 Main.warn("FileDrop: Drop will not work due to previous error. Do you have another listener attached?" ); 337 337 } // end catch … … 413 413 * 414 414 * @param c The component to unregister as a drop target 415 * @return {@code true} if at least one item has been removed, {@code false} otherwise 415 * @return {@code true} if at least one item has been removed, {@code false} otherwise 416 416 */ 417 417 public static boolean remove( Component c) -
trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
r6362 r6643 65 65 instance.initFromOAuth(Main.parent); 66 66 } catch (Throwable t) { 67 t.printStackTrace();67 Main.error(t); 68 68 // Fall back to preferences if OAuth identification fails for any reason 69 69 instance.initFromPreferences(); … … 218 218 setFullyIdentified(info.getDisplayName(), info); 219 219 } catch (IllegalArgumentException e) { 220 e.printStackTrace();220 Main.error(e); 221 221 } catch (OsmTransferException e) { 222 e.printStackTrace();222 Main.error(e); 223 223 } 224 224 } … … 277 277 instance.initFromOAuth(Main.parent); 278 278 } catch (Throwable t) { 279 t.printStackTrace();279 Main.error(t); 280 280 } 281 281 } -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r6314 r6643 904 904 thread.interrupt(); 905 905 } catch (Exception e) { 906 e.printStackTrace();906 Main.error(e); 907 907 } 908 908 } -
trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
r6539 r6643 273 273 } 274 274 } catch (Exception e) { 275 e.printStackTrace();275 Main.error(e); 276 276 } 277 277 } -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r6310 r6643 46 46 import org.openstreetmap.gui.jmapviewer.interfaces.MapMarker; 47 47 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader; 48 import org.openstreetmap.josm.Main; 48 49 import org.openstreetmap.josm.data.Bounds; 49 50 import org.openstreetmap.josm.data.Version; … … 718 719 g.drawRect(x_min, y_min, w, h); 719 720 } catch (Exception e) { 720 e.printStackTrace();721 Main.error(e); 721 722 } 722 723 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java
r6361 r6643 514 514 } catch(InterruptedException e) { 515 515 Main.warn("InterruptedException in "+getClass().getSimpleName()+" while downloading changeset header"); 516 } catch(ExecutionException e) {517 e.printStackTrace();516 } catch(ExecutionException e) { 517 Main.error(e); 518 518 BugReportExceptionHandler.handleException(e.getCause()); 519 519 return; -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r6361 r6643 847 847 } else { 848 848 Main.warn("Button " + button + " doesn't have action defined"); 849 new Exception().printStackTrace();849 Main.error(new Exception()); 850 850 } 851 851 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
r6380 r6643 223 223 return getBaseUserUrl() + "/" + URLEncoder.encode(user.getName(), "UTF-8").replaceAll("\\+", "%20"); 224 224 } catch(UnsupportedEncodingException e) { 225 e.printStackTrace();225 Main.error(e); 226 226 JOptionPane.showMessageDialog( 227 227 Main.parent, -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r6623 r6643 1094 1094 } 1095 1095 } catch (Exception e) { 1096 e.printStackTrace();1096 Main.error(e); 1097 1097 } 1098 1098 } 1099 1099 }); 1100 1100 } catch (Exception e1) { 1101 e1.printStackTrace();1101 Main.error(e1); 1102 1102 } 1103 1103 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java
r6248 r6643 132 132 return; 133 133 if (lastException != null) { 134 lastException.printStackTrace();134 Main.error(lastException); 135 135 return; 136 136 } -
trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
r6552 r6643 246 246 } 247 247 } catch (NumberFormatException x) { 248 x.printStackTrace(); // SAXException does not chain correctly248 Main.error(x); // SAXException does not chain correctly 249 249 throw new SAXException(x.getMessage(), x); 250 250 } catch (NullPointerException x) { 251 x.printStackTrace(); // SAXException does not chain correctly251 Main.error(x); // SAXException does not chain correctly 252 252 throw new SAXException(tr("Null pointer exception, possibly some missing tags."), x); 253 253 } -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r6296 r6643 146 146 } catch(Exception e) { 147 147 Main.error(tr("Failed to read CSS file ''help-browser.css''. Exception is: {0}", e.toString())); 148 e.printStackTrace();148 Main.error(e); 149 149 return ss; 150 150 } finally { … … 237 237 help.getEditorKit().read(new StringReader(content), document, 0); 238 238 } catch (Exception e) { 239 e.printStackTrace();239 Main.error(e); 240 240 } 241 241 help.setDocument(document); … … 317 317 return; 318 318 } catch(HelpContentReaderException e2) { 319 e2.printStackTrace();319 Main.error(e2); 320 320 handleHelpContentReaderException(relativeHelpTopic, e2); 321 321 return; 322 322 } 323 323 } catch(HelpContentReaderException e1) { 324 e1.printStackTrace();324 Main.error(e1); 325 325 handleHelpContentReaderException(relativeHelpTopic, e1); 326 326 return; 327 327 } 328 328 } catch(HelpContentReaderException e) { 329 e.printStackTrace();329 Main.error(e); 330 330 handleHelpContentReaderException(relativeHelpTopic, e); 331 331 return; … … 352 352 return; 353 353 } catch(HelpContentReaderException e) { 354 e.printStackTrace();354 Main.error(e); 355 355 handleHelpContentReaderException(absoluteHelpTopic, e); 356 356 return; … … 556 556 } catch (BadLocationException e) { 557 557 Main.warn(tr("Bad location in HTML document. Exception was: {0}", e.toString())); 558 e.printStackTrace();558 Main.error(e); 559 559 } 560 560 } -
trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java
r6519 r6643 154 154 } 155 155 } catch(UnsupportedEncodingException e) { 156 e.printStackTrace();156 Main.error(e); 157 157 lblUser.setUrl(null); 158 158 } … … 172 172 lblUser.setUrl(url); 173 173 } catch(UnsupportedEncodingException e) { 174 e.printStackTrace();174 Main.error(e); 175 175 lblUser.setUrl(null); 176 176 } -
trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java
r6248 r6643 149 149 download(); 150 150 } catch(DownloadException e) { 151 e.printStackTrace();151 Main.error(e); 152 152 } 153 153 } -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java
r5835 r6643 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import org.openstreetmap.josm.Main; 6 7 import org.openstreetmap.josm.actions.SaveAction; 7 8 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; … … 56 57 } 57 58 } catch(Exception e) { 58 e.printStackTrace();59 Main.error(e); 59 60 setLastException(e); 60 61 } -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
r6084 r6643 28 28 import javax.swing.DefaultListCellRenderer; 29 29 import javax.swing.ImageIcon; 30 import javax.swing.JButton; 30 31 import javax.swing.JComponent; 31 import javax.swing.JButton;32 32 import javax.swing.JDialog; 33 33 import javax.swing.JLabel; … … 482 482 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 483 483 } catch(Exception e) { 484 e.printStackTrace();484 Main.error(e); 485 485 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.FAILED); 486 486 ExceptionDialogUtil.explainException(e); … … 489 489 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 490 490 } else if (currentTask.isFailed()) { 491 currentTask.getLastException().printStackTrace();491 Main.error(currentTask.getLastException()); 492 492 ExceptionDialogUtil.explainException(currentTask.getLastException()); 493 493 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.FAILED); … … 516 516 model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 517 517 } catch(Exception e) { 518 e.printStackTrace();518 Main.error(e); 519 519 model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.FAILED); 520 520 ExceptionDialogUtil.explainException(e); … … 524 524 } else if (currentTask.isFailed()) { 525 525 if (currentTask.getLastException() != null) { 526 currentTask.getLastException().printStackTrace();526 Main.error(currentTask.getLastException()); 527 527 ExceptionDialogUtil.explainException(currentTask.getLastException()); 528 528 } -
trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
r6316 r6643 254 254 break; 255 255 } catch(OsmTransferCanceledException e) { 256 e.printStackTrace();256 Main.error(e); 257 257 uploadCanceled = true; 258 258 break uploadloop; -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r6450 r6643 78 78 import org.xml.sax.SAXException; 79 79 80 /** 80 /** 81 81 * This class displays the window to select the GPX file and the offset (timezone + delta). 82 82 * Then it correlates the images of the layer with that GPX file. … … 180 180 181 181 } catch (SAXException x) { 182 x.printStackTrace();182 Main.error(x); 183 183 JOptionPane.showMessageDialog( 184 184 Main.parent, … … 189 189 return; 190 190 } catch (IOException x) { 191 x.printStackTrace();191 Main.error(x); 192 192 JOptionPane.showMessageDialog( 193 193 Main.parent, … … 1145 1145 } catch(ParseException e) { 1146 1146 Main.error("Error while parsing date \"" + curWpTimeStr + '"'); 1147 e.printStackTrace();1147 Main.error(e); 1148 1148 prevWp = null; 1149 1149 prevWpTime = 0; -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r6524 r6643 182 182 canonical = f.getCanonicalPath(); 183 183 } catch (IOException e) { 184 e.printStackTrace();184 Main.error(e); 185 185 rememberError(tr("Unable to get canonical path for directory {0}\n", 186 186 f.getAbsolutePath())); … … 199 199 addRecursiveFiles(files, Arrays.asList(children)); 200 200 } catch(NullPointerException npe) { 201 npe.printStackTrace();201 Main.error(npe); 202 202 rememberError(tr("Found null file in directory {0}\n", f.getPath())); 203 203 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r6362 r6643 254 254 } catch (IOException e) { 255 255 Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", entry.url, e.toString())); 256 e.printStackTrace();256 Main.error(e); 257 257 } finally { 258 258 Utils.close(in); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r6552 r6643 79 79 } catch (IOException e) { 80 80 Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString())); 81 e.printStackTrace();81 Main.error(e); 82 82 logError(e); 83 83 } catch (TokenMgrError e) { 84 84 Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage())); 85 e.printStackTrace();85 Main.error(e); 86 86 logError(e); 87 87 } catch (ParseException e) { 88 88 Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage())); 89 e.printStackTrace();89 Main.error(e); 90 90 logError(new ParseException(e.getMessage())); // allow e to be garbage collected, it links to the entire token stream 91 91 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r6579 r6643 83 83 } catch (IOException e) { 84 84 Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString())); 85 e.printStackTrace();85 Main.error(e); 86 86 logError(e); 87 87 } catch (SAXParseException e) { 88 88 Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: [{1}:{2}] {3}", url, e.getLineNumber(), e.getColumnNumber(), e.getMessage())); 89 e.printStackTrace();89 Main.error(e); 90 90 logError(e); 91 91 } catch (SAXException e) { 92 92 Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage())); 93 e.printStackTrace();93 Main.error(e); 94 94 logError(e); 95 95 } -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
r6340 r6643 196 196 } 197 197 } catch(CredentialsAgentException e) { 198 e.printStackTrace();198 Main.error(e); 199 199 tfUserName.setText(""); 200 200 tfPassword.setText(""); … … 525 525 } 526 526 }; 527 e.printStackTrace();527 Main.error(e); 528 528 GuiHelper.runInEDT(r); 529 529 } -
trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
r6599 r6643 111 111 } 112 112 } catch (NoSuchFieldException e) { 113 e.printStackTrace();113 Main.error(e); 114 114 Main.warn(tr("Failed to cancel running OAuth operation")); 115 115 } catch (SecurityException e) { 116 e.printStackTrace();116 Main.error(e); 117 117 Main.warn(tr("Failed to cancel running OAuth operation")); 118 118 } catch (IllegalAccessException e) { 119 e.printStackTrace();119 Main.error(e); 120 120 Main.warn(tr("Failed to cancel running OAuth operation")); 121 121 } -
trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java
r5899 r6643 9 9 import javax.swing.JOptionPane; 10 10 11 import org.openstreetmap.josm.Main; 11 12 import org.openstreetmap.josm.data.oauth.OAuthParameters; 12 13 import org.openstreetmap.josm.data.oauth.OAuthToken; … … 87 88 return; 88 89 } catch (OsmOAuthAuthorizationException e) { 89 e.printStackTrace();90 Main.error(e); 90 91 alertRetrievingAccessTokenFailed(e); 91 92 accessToken = null; -
trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java
r5266 r6643 9 9 import javax.swing.JOptionPane; 10 10 11 import org.openstreetmap.josm.Main; 11 12 import org.openstreetmap.josm.data.oauth.OAuthParameters; 12 13 import org.openstreetmap.josm.data.oauth.OAuthToken; … … 81 82 return; 82 83 } catch (OsmOAuthAuthorizationException e) { 83 e.printStackTrace();84 Main.error(e); 84 85 alertRetrievingRequestTokenFailed(e); 85 86 requestToken = null; -
trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
r6362 r6643 17 17 import oauth.signpost.exception.OAuthException; 18 18 19 import org.openstreetmap.josm.Main; 19 20 import org.openstreetmap.josm.data.oauth.OAuthParameters; 20 21 import org.openstreetmap.josm.data.oauth.OAuthToken; … … 253 254 }catch(OsmOAuthAuthorizationException e) { 254 255 if (canceled) return; 255 e.printStackTrace();256 Main.error(e); 256 257 alertFailedSigning(); 257 258 } catch(OsmApiException e) { 258 259 if (canceled) return; 259 e.printStackTrace();260 Main.error(e); 260 261 if (e.getResponseCode() == HttpURLConnection.HTTP_INTERNAL_ERROR) { 261 262 alertInternalError(); … … 271 272 } catch(OsmTransferException e) { 272 273 if (canceled) return; 273 e.printStackTrace();274 Main.error(e); 274 275 alertFailedConnection(); 275 276 } -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
r6529 r6643 552 552 sps.addGui(this); 553 553 } catch (SecurityException ex) { 554 ex.printStackTrace();554 Main.error(ex); 555 555 } catch (Throwable ex) { 556 556 BugReportExceptionHandler.handleException(ex); … … 566 566 setSelectedIndex(index); 567 567 } catch (SecurityException ex) { 568 ex.printStackTrace();568 Main.error(ex); 569 569 } catch (Throwable ex) { 570 570 // allow to change most settings even if e.g. a plugin fails -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r6380 r6643 732 732 return true; 733 733 } catch (Exception e) { 734 e.printStackTrace();734 Main.error(e); 735 735 } 736 736 return false; … … 751 751 } 752 752 } catch (Exception e) { 753 e.printStackTrace();753 Main.error(e); 754 754 } 755 755 movingComponent = ""; -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
r6317 r6643 12 12 import java.util.List; 13 13 import java.util.Map; 14 import java.util.Map.Entry; 14 15 import java.util.Observable; 15 16 import java.util.Set; 16 import java.util.Map.Entry;17 17 18 18 import org.openstreetmap.josm.Main; … … 359 359 oldinfo.updateLocalInfo(newinfo); 360 360 } catch(PluginException e) { 361 e.printStackTrace();361 Main.error(e); 362 362 } 363 363 } -
trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
r6529 r6643 14 14 import javax.swing.JOptionPane; 15 15 16 import org.openstreetmap.josm.Main; 16 17 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 17 18 import org.openstreetmap.josm.gui.PleaseWaitRunnable; … … 211 212 // ignore exceptions 212 213 return; 213 e.printStackTrace();214 Main.error(e); 214 215 alertConnectionFailed(); 215 216 return; -
trunk/src/org/openstreetmap/josm/gui/preferences/server/BasicAuthenticationPreferencesPanel.java
r6529 r6643 108 108 } 109 109 } catch(CredentialsAgentException e) { 110 e.printStackTrace();110 Main.error(e); 111 111 Main.warn(tr("Failed to retrieve OSM credentials from credential manager.")); 112 112 Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName())); … … 128 128 cm.store(RequestorType.SERVER, OsmApi.getOsmApi().getHost(), pa); 129 129 } catch (CredentialsAgentException e) { 130 e.printStackTrace();130 Main.error(e); 131 131 Main.warn(tr("Failed to save OSM credentials to credential manager.")); 132 132 Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName())); -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java
r6529 r6643 154 154 token = cm.lookupOAuthAccessToken(); 155 155 } catch(CredentialsAgentException e) { 156 e.printStackTrace();156 Main.error(e); 157 157 Main.warn(tr("Failed to retrieve OAuth Access Token from credential manager")); 158 158 Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName())); … … 185 185 } 186 186 } catch(CredentialsAgentException e){ 187 e.printStackTrace();187 Main.error(e); 188 188 Main.warn(tr("Failed to store OAuth Access Token to credentials manager")); 189 189 Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName())); -
trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java
r6529 r6643 359 359 } 360 360 } catch(CredentialsAgentException e) { 361 e.printStackTrace();361 Main.error(e); 362 362 tfProxyHttpUser.setText(""); 363 363 tfProxyHttpPassword.setText(""); … … 434 434 cm.store(RequestorType.PROXY, tfProxyHttpHost.getText(), pa); 435 435 } catch(CredentialsAgentException e) { 436 e.printStackTrace();436 Main.error(e); 437 437 } 438 438 } -
trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
r6529 r6643 83 83 } 84 84 } catch (Exception e) { 85 e.printStackTrace();85 Main.error(e); 86 86 } 87 87 } -
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r6362 r6643 82 82 SwingUtilities.invokeAndWait(task); 83 83 } catch (InterruptedException e) { 84 e.printStackTrace();84 Main.error(e); 85 85 } catch (InvocationTargetException e) { 86 e.printStackTrace();86 Main.error(e); 87 87 } 88 88 }
Note:
See TracChangeset
for help on using the changeset viewer.