Changeset 4020 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-04-13T22:09:36+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
r3255 r4020 272 272 */ 273 273 public static void explainAuthorizationFailed(OsmApiException e) { 274 HelpAwareOptionPane.showOptionDialog( 275 Main.parent, 276 ExceptionUtil.explainFailedOAuthAuthorisation(e), 274 // Fixme: add special handling that calls ExceptionUtil.explainFailedOAuthAuthorisation(e) 275 HelpAwareOptionPane.showOptionDialog( 276 Main.parent, 277 ExceptionUtil.explainFailedAuthorisation(e), 277 278 tr("Authorisation Failed"), 278 279 JOptionPane.ERROR_MESSAGE, -
trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
r3562 r4020 126 126 + "</html>", 127 127 OAuthAccessTokenHolder.getInstance().getAccessTokenKey() 128 ); 129 } 130 131 public static String explainFailedAuthorisation(OsmApiException e) { 132 e.printStackTrace(); 133 String header = e.getErrorHeader(); 134 String body = e.getErrorBody(); 135 String msg = null; 136 if (header != null) { 137 if (body != null && !header.equals(body)) { 138 msg = header + " (" + body + ")"; 139 } else { 140 msg = header; 141 } 142 } else { 143 msg = body; 144 } 145 146 return tr("<html>" 147 + "Authorisation at the OSM server failed.<br>" 148 + "The server reported the following error:<br>" 149 + "''{0}''" 150 + "</html>", 151 msg 128 152 ); 129 153 }
Note:
See TracChangeset
for help on using the changeset viewer.