001 // License: GPL. For details, see LICENSE file.
002 package org.openstreetmap.josm.io;
003
004 /**
005 * Exception thrown when a communication error occured with the OSM server during API initialization.
006 * @see OsmApi#initialize
007 */
008 public class OsmApiInitializationException extends OsmTransferException {
009
010 /**
011 * Constructs an {@code OsmApiInitializationException} with the specified detail message.
012 * The cause is not initialized, and may subsequently be initialized by a call to {@link #initCause}.
013 *
014 * @param message The detail message (which is saved for later retrieval by the {@link #getMessage} method)
015 */
016 public OsmApiInitializationException(String message) {
017 super(message);
018 }
019
020 /**
021 * Constructs an {@code OsmApiInitializationException} with the specified cause and a detail message of
022 * <tt>(cause==null ? null : cause.toString())</tt>
023 * (which typically contains the class and detail message of <tt>cause</tt>).
024 *
025 * @param cause the cause (which is saved for later retrieval by the {@link #getCause} method).
026 * A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent or unknown.
027 */
028 public OsmApiInitializationException(Throwable cause) {
029 super(cause);
030 }
031
032 /**
033 * Constructs an {@code OsmApiInitializationException} with the specified detail message and cause.
034 *
035 * <p> Note that the detail message associated with {@code cause} is <i>not</i> automatically incorporated
036 * into this exception's detail message.
037 *
038 * @param message The detail message (which is saved for later retrieval by the {@link #getMessage} method)
039 * @param cause The cause (which is saved for later retrieval by the {@link #getCause} method).
040 * A null value is permitted, and indicates that the cause is nonexistent or unknown.
041 *
042 */
043 public OsmApiInitializationException(String message, Throwable cause) {
044 super(message, cause);
045 }
046 }