001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *   https://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019
020package org.apache.commons.compress.archivers.dump;
021
022import org.apache.commons.compress.archivers.ArchiveException;
023
024/**
025 * Signals that an dump archive exception of some sort has occurred.
026 */
027public class DumpArchiveException extends ArchiveException {
028
029    private static final long serialVersionUID = 1L;
030
031    /**
032     * Constructs a {@code DumpArchiveException} with {@code null} as its error detail message.
033     */
034    public DumpArchiveException() {
035    }
036
037    /**
038     * Constructs a {@code DumpArchiveException} with the specified detail message.
039     *
040     * @param message The detail message (which is saved for later retrieval by the {@link #getMessage()} method).
041     */
042    public DumpArchiveException(final String message) {
043        super(message);
044    }
045
046    /**
047     * Constructs a {@code DumpArchiveException} with the specified detail message and cause.
048     *
049     * <p>
050     * Note that the detail message associated with {@code cause} is <em>not</em> automatically incorporated into this exception's detail message.
051     * </p>
052     *
053     * @param message The detail message (which is saved for later retrieval by the {@link #getMessage()} method).
054     *
055     * @param cause   The cause (which is saved for later retrieval by the {@link #getCause()} method). (A null value is permitted, and indicates that the cause
056     *                is nonexistent or unknown.)
057     */
058    public DumpArchiveException(final String message, final Throwable cause) {
059        super(message, cause);
060    }
061
062    /**
063     * Constructs a {@code DumpArchiveException} with the specified cause and a detail message of {@code (cause==null ? null : cause.toString())} (which
064     * typically contains the class and detail message of {@code cause}). This constructor is useful for IO exceptions that are little more than wrappers for
065     * other throwables.
066     *
067     * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method). (A null value is permitted, and indicates that the cause
068     *              is nonexistent or unknown.)
069     */
070    public DumpArchiveException(final Throwable cause) {
071        super(cause);
072    }
073}