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.module.apt;
020
021import org.apache.maven.doxia.parser.ParseException;
022
023/**
024 * Wraps an exception when parsing apt source documents.
025 *
026 * @since 1.0
027 */
028public class AptParseException extends ParseException {
029    /** serialVersionUID */
030    static final long serialVersionUID = 1694654412921168623L;
031
032    /**
033     * Construct a new AptParseException with the cause.
034     *
035     * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
036     * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
037     */
038    public AptParseException(Exception e) {
039        super(e);
040    }
041
042    /**
043     * Construct a new AptParseException 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 AptParseException(String message) {
049        super(message);
050    }
051
052    /**
053     * Construct a new AptParseException with the specified detail message and cause.
054     *
055     * @param message The detailed message.
056     * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
057     * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
058     * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
059     */
060    public AptParseException(String message, Exception e) {
061        super(message, e);
062    }
063
064    /**
065     * Construct a new AptParseException with the specified cause, detail message,
066     * filename, line number and column number.
067     *
068     * @param message The detailed message.
069     * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
070     * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
071     * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
072     * @param name Name of a file that couldn't be parsed.
073     * This can later be retrieved by the getFileName() method.
074     * @param line The line number where the parsing failed.
075     * This can later be retrieved by the getLineNumber() method.
076     * @param column The column number where the parsing failed.
077     * This can later be retrieved by the getColumnNumber() method.
078     */
079    public AptParseException(String message, Exception e, String name, int line, int column) {
080        super(message, e, name, line, column);
081    }
082
083    /**
084     * Construct a new AptParseException with the specified detail message and cause.
085     *
086     * @param message The detailed message.
087     * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
088     * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
089     * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
090     * @param line The line number where the parsing failed.
091     * This can later be retrieved by the getLineNumber() method.
092     * @param column The column number where the parsing failed.
093     * This can later be retrieved by the getColumnNumber() method.
094     */
095    public AptParseException(String message, Exception e, int line, int column) {
096        super(message, e, line, column);
097    }
098}