View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.doxia.module.apt;
20  
21  import org.apache.maven.doxia.parser.ParseException;
22  
23  /**
24   * Wraps an exception when parsing apt source documents.
25   *
26   * @since 1.0
27   */
28  public class AptParseException extends ParseException {
29      /** serialVersionUID */
30      static final long serialVersionUID = 1694654412921168623L;
31  
32      /**
33       * Construct a new AptParseException with the cause.
34       *
35       * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
36       * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
37       */
38      public AptParseException(Exception e) {
39          super(e);
40      }
41  
42      /**
43       * Construct a new AptParseException with the specified detail message.
44       *
45       * @param message The detailed message.
46       * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
47       */
48      public AptParseException(String message) {
49          super(message);
50      }
51  
52      /**
53       * Construct a new AptParseException with the specified detail message and cause.
54       *
55       * @param message The detailed message.
56       * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
57       * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
58       * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
59       */
60      public AptParseException(String message, Exception e) {
61          super(message, e);
62      }
63  
64      /**
65       * Construct a new AptParseException with the specified cause, detail message,
66       * filename, line number and column number.
67       *
68       * @param message The detailed message.
69       * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
70       * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
71       * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
72       * @param name Name of a file that couldn't be parsed.
73       * This can later be retrieved by the getFileName() method.
74       * @param line The line number where the parsing failed.
75       * This can later be retrieved by the getLineNumber() method.
76       * @param column The column number where the parsing failed.
77       * This can later be retrieved by the getColumnNumber() method.
78       */
79      public AptParseException(String message, Exception e, String name, int line, int column) {
80          super(message, e, name, line, column);
81      }
82  
83      /**
84       * Construct a new AptParseException with the specified detail message and cause.
85       *
86       * @param message The detailed message.
87       * This can later be retrieved by the <code>Throwable.getMessage()</code> method.
88       * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method.
89       * (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
90       * @param line The line number where the parsing failed.
91       * This can later be retrieved by the getLineNumber() method.
92       * @param column The column number where the parsing failed.
93       * This can later be retrieved by the getColumnNumber() method.
94       */
95      public AptParseException(String message, Exception e, int line, int column) {
96          super(message, e, line, column);
97      }
98  }