Class ParseException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    AptParseException

    public class ParseException
    extends java.lang.Exception
    Encapsulate a Doxia parse error.
    Since:
    1.0
    Version:
    $Id: ParseException.java 747780 2009-02-25 13:55:23Z vsiveton $
    Author:
    Jason van Zyl
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ParseException​(java.lang.Exception e)
      Deprecated.
      Using ParseException(Exception, int, int) to specify the line and column number.
      ParseException​(java.lang.Exception e, int line, int column)
      Constructs a new exception with the specified cause, line number and column number.
      ParseException​(java.lang.Exception e, java.lang.String file, int line)
      Deprecated.
      Using ParseException(Exception, String, int, int) to specify the column number.
      ParseException​(java.lang.Exception e, java.lang.String file, int line, int column)
      Construct a new ParseException with the specified cause, filename, line number and column number.
      ParseException​(java.lang.Exception e, java.lang.String message, java.lang.String file, int line, int column)
      Construct a new ParseException with the specified cause, detail message, filename, line number and column number.
      ParseException​(java.lang.String message)
      Construct a new ParseException with the specified detail message.
      ParseException​(java.lang.String message, int line, int column)
      Construct a new ParseException with the specified detail message, line number and column number.
      ParseException​(java.lang.String message, java.lang.Exception e)
      Construct a new ParseException with the specified detail message and cause.
      ParseException​(java.lang.String message, java.lang.Exception e, int line, int column)
      Construct a new ParseException with the specified detail message and cause, line number and column number.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnNumber()
      Getter for the field columnNumber.
      java.lang.String getFileName()
      Getter for the field fileName.
      int getLineNumber()
      Getter for the field lineNumber.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, 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​(java.lang.String message)
        Construct a new ParseException 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 the Throwable.getMessage() method.
      • ParseException

        public ParseException​(java.lang.String message,
                              java.lang.Exception e)
        Construct a new ParseException 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 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​(java.lang.String message,
                              int line,
                              int column)
        Construct a new ParseException with the specified detail message, line number and column number.
        Parameters:
        message - The detailed message. This can later be retrieved by the Throwable.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

        public ParseException​(java.lang.String message,
                              java.lang.Exception e,
                              int line,
                              int column)
        Construct a new ParseException with the specified detail message and cause, line number and column number.
        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.)
        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

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

        public ParseException​(java.lang.Exception e,
                              int line,
                              int column)
        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 the Throwable.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

        public ParseException​(java.lang.Exception e,
                              java.lang.String file,
                              int line)
        Deprecated.
        Using ParseException(Exception, String, int, int) to specify the column number.
        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​(java.lang.Exception e,
                              java.lang.String file,
                              int line,
                              int column)
        Construct a new ParseException with the specified cause, filename, line number and column number.
        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.
        column - The column number where the parsing failed. This can later be retrieved by the getColumnNumber() method.
      • ParseException

        public ParseException​(java.lang.Exception e,
                              java.lang.String message,
                              java.lang.String file,
                              int line,
                              int column)
        Construct a new ParseException with the specified cause, detail message, filename, line number and column number.
        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.
        column - The column number where the parsing failed. This can later be retrieved by the getColumnNumber() method.
        Since:
        1.1
    • Method Detail

      • getFileName

        public java.lang.String 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