Class ParserException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ParserException
    extends ProjogException
    Signals a failure to successfully parse Prolog syntax.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnNumber()
      Returns the index in the line being parsed of the character being parsed when the problem occurred.
      void getDescription​(java.io.PrintStream out)
      Prints a description of this exception to the specified print stream.
      java.lang.String getLine()
      Returns the contents of the line being parsed when the problem occurred.
      int getLineNumber()
      Returns the line number of the line being parsed when the problem occurred.
      • 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
    • Field Detail

      • message

        private final java.lang.String message
      • line

        private final java.lang.String line
      • lineNumber

        private final int lineNumber
      • columnNumber

        private final int columnNumber
    • Constructor Detail

      • ParserException

        ParserException​(java.lang.String message,
                        CharacterParser parser)
      • ParserException

        ParserException​(java.lang.String message,
                        CharacterParser parser,
                        java.lang.Throwable t)
    • Method Detail

      • getLine

        public java.lang.String getLine()
        Returns the contents of the line being parsed when the problem occurred.
      • getLineNumber

        public int getLineNumber()
        Returns the line number of the line being parsed when the problem occurred.
      • getColumnNumber

        public int getColumnNumber()
        Returns the index in the line being parsed of the character being parsed when the problem occurred.
      • getDescription

        public void getDescription​(java.io.PrintStream out)
        Prints a description of this exception to the specified print stream.

        The description contains the particular line being parsed when the exception was thrown.

        Parameters:
        out - PrintStream to use for output