001package org.apache.maven.doxia.module.apt;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import org.apache.maven.doxia.parser.ParseException;
023
024/**
025 * Wraps an exception when parsing apt source documents.
026 *
027 * @version $Id$
028 * @since 1.0
029 */
030public class AptParseException
031    extends ParseException
032{
033    /** serialVersionUID */
034    static final long serialVersionUID = 1694654412921168623L;
035
036    /**
037     * Construct a new AptParseException with the specified detail message.
038     *
039     * @param message The detailed message.
040     * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
041     */
042    public AptParseException( String message )
043    {
044        super( message );
045    }
046
047    /**
048     * Construct a new AptParseException with the specified detail message and cause.
049     *
050     * @param message The detailed message.
051     * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
052     * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
053     * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
054     */
055    public AptParseException( String message, Exception e )
056    {
057        super( message, e );
058    }
059
060    /**
061     * Construct a new AptParseException with the specified cause, detail message,
062     * filename, line number and column number.
063     *
064     * @param message The detailed message.
065     * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
066     * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
067     * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
068     * @param name Name of a file that couldn't be parsed.
069     * This can later be retrieved by the getFileName() method.
070     * @param line The line number where the parsing failed.
071     * This can later be retrieved by the getLineNumber() method.
072     * @param column The column number where the parsing failed.
073     * This can later be retrieved by the getColumnNumber() method.
074     */
075    public AptParseException( String message, Exception e, String name, int line, int column )
076    {
077        super( e, message, name, line, column );
078    }
079
080    /**
081     * Construct a new AptParseException with the specified detail message and cause.
082     *
083     * @param message The detailed message.
084     * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
085     * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
086     * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
087     * @param line The line number where the parsing failed.
088     * This can later be retrieved by the getLineNumber() method.
089     * @param column The column number where the parsing failed.
090     * This can later be retrieved by the getColumnNumber() method.
091     */
092    public AptParseException( String message, Exception e, int line, int column )
093    {
094        super( message, e, line, column );
095    }
096}