Package org.apache.maven.doxia.parser
Class ParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.maven.doxia.parser.ParseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AptParseException
Encapsulate a Doxia parse error.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Column number where the parse exception occurred.private String
The file that caused the ParseException.private int
Line number where the parse exception occurred.(package private) static final long
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.ParseException
(Exception e, int line, int column) Constructs a new exception with the specified cause, line number and column number.ParseException
(Exception e, String file, int line) Deprecated.UsingParseException(Exception, String, int, int)
to specify the column number.ParseException
(Exception e, String file, int line, int column) Construct a newParseException
with the specified cause, filename, line number and column number.ParseException
(Exception e, String message, String file, int line, int column) Construct a newParseException
with the specified cause, detail message, filename, line number and column number.ParseException
(String message) Construct a newParseException
with the specified detail message.ParseException
(String message, int line, int column) Construct a newParseException
with the specified detail message, line number and column number.ParseException
(String message, Exception e) Construct a newParseException
with the specified detail message and cause.ParseException
(String message, Exception e, int line, int column) Construct a newParseException
with the specified detail message and cause, line number and column number. -
Method Summary
Modifier and TypeMethodDescriptionint
Getter for the fieldcolumnNumber
.Getter for the fieldfileName
.int
Getter for the fieldlineNumber
.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
static final long serialVersionUIDserialVersionUID- See Also:
-
fileName
The file that caused the ParseException. -
lineNumber
private int lineNumberLine number where the parse exception occurred. -
columnNumber
private int columnNumberColumn number where the parse exception occurred.
-
-
Constructor Details
-
ParseException
Construct a newParseException
with the specified detail message.
Note: no line or column number will be used.- Parameters:
message
- The detailed message. This can later be retrieved by theThrowable.getMessage()
method.
-
ParseException
Construct a newParseException
with the specified detail message and cause.
Note: no line or column number will be used.- Parameters:
message
- The detailed message. This can later be retrieved by theThrowable.getMessage()
method.e
- the cause. This can be retrieved later by theThrowable.getCause()
method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
-
ParseException
Construct a newParseException
with the specified detail message, line number and column number.- Parameters:
message
- The detailed message. This can later be retrieved by theThrowable.getMessage()
method.line
- The line number where the parsing failed. This can later be retrieved by the getLineNumber() method.column
- The column number where the parsing failed. This can later be retrieved by the getColumnNumber() method.- Since:
- 1.1
-
ParseException
Construct a newParseException
with the specified detail message and cause, line number and column number.- Parameters:
message
- The detailed message. This can later be retrieved by theThrowable.getMessage()
method.e
- the cause. This can be retrieved later by theThrowable.getCause()
method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)line
- The line number where the parsing failed. This can later be retrieved by the getLineNumber() method.column
- The column number where the parsing failed. This can later be retrieved by the getColumnNumber() method.- Since:
- 1.1
-
ParseException
Deprecated.UsingParseException(Exception, int, int)
to specify the line and column number.Constructs a new exception with the specified cause. The error message is (cause == null ? null : cause.toString() ).- Parameters:
e
- the cause. This can be retrieved later by theThrowable.getCause()
method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
-
ParseException
Constructs a new exception with the specified cause, line number and column number. The error message is (cause == null ? null : cause.toString() ).- Parameters:
e
- the cause. This can be retrieved later by theThrowable.getCause()
method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)line
- The line number where the parsing failed. This can later be retrieved by the getLineNumber() method.column
- The column number where the parsing failed. This can later be retrieved by the getColumnNumber() method.- Since:
- 1.1
-
ParseException
Deprecated.UsingParseException(Exception, String, int, int)
to specify the column number.Construct a newParseException
with the specified cause, filename and linenumber.- Parameters:
e
- the cause. This can be retrieved later by theThrowable.getCause()
method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)file
- Name of a file that couldn't be parsed. This can later be retrieved by the getFileName() method.line
- The line number where the parsing failed. This can later be retrieved by the getLineNumber() method.
-
ParseException
Construct a newParseException
with the specified cause, filename, line number and column number.- Parameters:
e
- the cause. This can be retrieved later by theThrowable.getCause()
method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)file
- Name of a file that couldn't be parsed. This can later be retrieved by the getFileName() method.line
- The line number where the parsing failed. This can later be retrieved by the getLineNumber() method.column
- The column number where the parsing failed. This can later be retrieved by the getColumnNumber() method.
-
ParseException
Construct a newParseException
with the specified cause, detail message, filename, line number and column number.- Parameters:
e
- the cause. This can be retrieved later by theThrowable.getCause()
method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)message
- The detailed message. This can later be retrieved by theThrowable.getMessage()
method.file
- Name of a file that couldn't be parsed. This can later be retrieved by the getFileName() method.line
- The line number where the parsing failed. This can later be retrieved by the getLineNumber() method.column
- The column number where the parsing failed. This can later be retrieved by the getColumnNumber() method.- Since:
- 1.1
-
-
Method Details
-
getFileName
Getter for the field
fileName
.- Returns:
- the file name that caused the
ParseException
.
-
getLineNumber
public int getLineNumber()Getter for the field
lineNumber
.- Returns:
- the line number where the
ParseException
occurred.
-
getColumnNumber
public int getColumnNumber()Getter for the field
columnNumber
.- Returns:
- the column number where the
ParseException
occurred. - Since:
- 1.1
-
ParseException(Exception, int, int)
to specify the line and column number.