Changeset 216 in josm
- Timestamp:
- 2007-04-10T14:37:17+02:00 (18 years ago)
- Location:
- src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/io/OsmServerWriter.java
r203 r216 150 150 * <code>false</code>, if only the id is encoded. 151 151 */ 152 @SuppressWarnings("unchecked")153 152 private void sendRequest(String requestMethod, String urlSuffix, 154 153 OsmPrimitive osm, boolean addBody) { … … 183 182 return; // everything fine.. was already deleted. 184 183 if (retCode != 200) { 184 // Look for a detailed error message from the server 185 if (activeConnection.getHeaderField("Error") != null) 186 retMsg += "\n" + activeConnection.getHeaderField("Error"); 187 188 // Report our error 185 189 ByteArrayOutputStream o = new ByteArrayOutputStream(); 186 190 OsmWriter.output(o, new OsmWriter.Single(osm, true)); -
src/org/openstreetmap/josm/io/ProgressInputStream.java
r160 r216 19 19 private PleaseWaitDialog pleaseWaitDlg; 20 20 21 public ProgressInputStream(URLConnection con, PleaseWaitDialog pleaseWaitDlg) throws IOException { 21 public class OsmServerException extends IOException { 22 private OsmServerException(String e) { 23 super(e); 24 } 25 } 26 27 public ProgressInputStream(URLConnection con, PleaseWaitDialog pleaseWaitDlg) throws IOException, OsmServerException { 22 28 this.connection = con; 23 this.in = con.getInputStream(); 29 30 try { 31 this.in = con.getInputStream(); 32 } catch (IOException e) { 33 if (con.getHeaderField("Error") != null) 34 throw new OsmServerException(con.getHeaderField("Error")); 35 throw e; 36 } 37 24 38 int contentLength = con.getContentLength(); 25 39 this.pleaseWaitDlg = pleaseWaitDlg;
Note:
See TracChangeset
for help on using the changeset viewer.