001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.io;
003
004/**
005 * Exception thrown when a communication error occurred with the OSM server during API initialization.
006 * @see OsmApi#initialize
007 */
008public 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     * <code>(cause==null ? null : cause.toString())</code>
023     * (which typically contains the class and detail message of <code>cause</code>).
024     *
025     * @param cause the cause (which is saved for later retrieval by the {@link #getCause} method).
026     *              A <code>null</code> 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}