001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.tools;
003
004/**
005 * Exception thrown when an operation is canceled by user.
006 * @since 1001 (creation)
007 * @since 8919 (move into this package)
008 */
009public class UserCancelException extends Exception {
010
011    /**
012     * Constructs a new {@code UserCancelException}.
013     */
014    public UserCancelException() {
015        super();
016    }
017
018    /**
019     * Constructs a new {@code UserCancelException} with the specified detail message and cause.
020     *
021     * @param  message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
022     * @param  cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
023     *         (A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent or unknown.)
024     */
025    public UserCancelException(String message, Throwable cause) {
026        super(message, cause);
027    }
028
029    /**
030     * Constructs a new {@code UserCancelException} with the specified detail message.
031     *
032     * @param  message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
033     */
034    public UserCancelException(String message) {
035        super(message);
036    }
037
038    /**
039     * Constructs a new {@code UserCancelException} with the specified cause.
040     *
041     * @param  cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
042     *         (A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent or unknown.)
043     */
044    public UserCancelException(Throwable cause) {
045        super(cause);
046    }
047}