org.apache.maven.doxia.parser
Class ParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.maven.doxia.parser.ParseException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AptParseException

public class ParseException
extends Exception

Encapsulate a Doxia parse error.

Since:
1.0
Version:
$Id: ParseException.java 566741 2007-08-16 15:01:27Z ltheussl $
Author:
Jason van Zyl
See Also:
Serialized Form

Constructor Summary
ParseException(Exception e)
          Constructs a new exception with the specified cause.
ParseException(Exception e, String file, int line)
          Construct a new ParseException with the specified cause, filename and linenumber.
ParseException(Exception e, String message, String file, int line)
          Construct a new ParseException with the specified cause, detail message, filename and linenumber.
ParseException(String message)
          Construct a new ParseException with the specified detail message.
ParseException(String message, Exception e)
          Construct a new ParseException with the specified detail message and cause.
 
Method Summary
 String getFileName()
          Returns the file that caused the ParseException.
 int getLineNumber()
          Returns the line number where the ParseException ocurred.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParseException

public ParseException(String message)
Construct a new ParseException with the specified detail message.

Parameters:
message - The detailed message. This can later be retrieved by the Throwable.getMessage() method.

ParseException

public ParseException(String message,
                      Exception e)
Construct a new ParseException with the specified detail message and cause.

Parameters:
message - The detailed message. This can later be retrieved by the Throwable.getMessage() method.
e - the cause. This can be retrieved later by the Throwable.getCause() method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

ParseException

public ParseException(Exception e)
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 the Throwable.getCause() method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

ParseException

public ParseException(Exception e,
                      String file,
                      int line)
Construct a new ParseException with the specified cause, filename and linenumber.

Parameters:
e - the cause. This can be retrieved later by the Throwable.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

public ParseException(Exception e,
                      String message,
                      String file,
                      int line)
Construct a new ParseException with the specified cause, detail message, filename and linenumber.

Parameters:
e - the cause. This can be retrieved later by the Throwable.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 the Throwable.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.
Method Detail

getFileName

public String getFileName()
Returns the file that caused the ParseException.

Returns:
the file that caused the ParseException.

getLineNumber

public int getLineNumber()
Returns the line number where the ParseException ocurred.

Returns:
the line number.


Copyright © 2005-2010 Apache Software Foundation. All Rights Reserved.