Changeset 5386 in josm for trunk/src/org/openstreetmap/josm/io/OsmTransferException.java
- Timestamp:
- 2012-07-31T21:48:49+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmTransferException.java
r3255 r5386 2 2 package org.openstreetmap.josm.io; 3 3 4 /** 5 * Exception thrown when a communication error with the OSM server occurs. 6 */ 4 7 public class OsmTransferException extends Exception { 5 8 6 9 private String url = OsmApi.getOsmApi().getBaseUrl(); 7 10 11 /** 12 * Constructs an {@code OsmTransferException} with {@code null} as its error detail message. 13 * The cause is not initialized, and may subsequently be initialized by a call to {@link #initCause}. 14 */ 8 15 public OsmTransferException() { 9 16 } 10 17 18 /** 19 * Constructs an {@code OsmTransferException} with the specified detail message. 20 * The cause is not initialized, and may subsequently be initialized by a call to {@link #initCause}. 21 * 22 * @param message The detail message (which is saved for later retrieval by the {@link #getMessage} method) 23 */ 11 24 public OsmTransferException(String message) { 12 25 super(message); 13 26 } 14 27 28 /** 29 * Constructs an {@code OsmTransferException} with the specified cause and a detail message of 30 * <tt>(cause==null ? null : cause.toString())</tt> 31 * (which typically contains the class and detail message of <tt>cause</tt>). 32 * 33 * @param cause the cause (which is saved for later retrieval by the {@link #getCause} method). 34 * A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent or unknown. 35 */ 15 36 public OsmTransferException(Throwable cause) { 16 37 super(cause); 17 38 } 18 39 40 /** 41 * Constructs an {@code OsmTransferException} with the specified detail message and cause. 42 * 43 * <p> Note that the detail message associated with {@code cause} is <i>not</i> automatically incorporated 44 * into this exception's detail message. 45 * 46 * @param message The detail message (which is saved for later retrieval by the {@link #getMessage} method) 47 * @param cause The cause (which is saved for later retrieval by the {@link #getCause} method). 48 * A null value is permitted, and indicates that the cause is nonexistent or unknown. 49 * 50 */ 19 51 public OsmTransferException(String message, Throwable cause) { 20 52 super(message, cause); 21 53 } 22 54 55 /** 56 * Sets the URL related to this error. 57 * @param url the URL related to this error (which is saved for later retrieval by the {@link #getUrl} method). 58 */ 23 59 public void setUrl(String url) { 24 60 this.url = url; … … 26 62 27 63 /** 28 * 29 * @return A pi base url or url set using setUrlmethod64 * Gets the URL related to this error. 65 * @return API base URL or URL set using the {@link #setUrl} method 30 66 */ 31 67 public String getUrl() { 32 68 return url; 33 69 } 34 35 70 }
Note:
See TracChangeset
for help on using the changeset viewer.