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 *   http://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 */
019package org.apache.maven.doxia.macro;
020
021/**
022 * Wrap an exception that occurs during the execution of a Doxia macro.
023 *
024 * @author <a href="mailto:brett@apache.org">Brett Porter</a>
025 * @since 1.0
026 */
027public class MacroExecutionException extends Exception {
028    /** serialVersionUID */
029    static final long serialVersionUID = -6314856898570018814L;
030
031    /**
032     * Construct a new <code>MacroExecutionException</code> with the specified cause.
033     *
034     * @param cause the cause. This can be retrieved later by the
035     * <code>Throwable.getCause()</code> method. (A null value is permitted, and indicates
036     * that the cause is nonexistent or unknown.)
037     */
038    public MacroExecutionException(Throwable cause) {
039        super(cause);
040    }
041
042    /**
043     * Construct a new <code>MacroExecutionException</code> with the specified detail message.
044     *
045     * @param message The detailed message.
046     * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
047     */
048    public MacroExecutionException(String message) {
049        super(message);
050    }
051
052    /**
053     * Construct a new <code>MacroExecutionException</code> with the specified
054     * detail message and cause.
055     *
056     * @param message The detailed message.
057     * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
058     * @param cause the cause. This can be retrieved later by the
059     * <code>Throwable.getCause()</code> method. (A null value is permitted, and indicates
060     * that the cause is nonexistent or unknown.)
061     */
062    public MacroExecutionException(String message, Throwable cause) {
063        super(message, cause);
064    }
065}