Orbital library

orbital.logic.sign
Class ParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by orbital.logic.sign.ParseException
All Implemented Interfaces:
java.io.Serializable

public class ParseException
extends java.lang.Exception

An exception thrown if an expression could not be parsed as desired. This may be the case if a lexical error, or a syntax error, or a type error occurred (which all are syntactical errors with respect to the Ch-0 grammar of a language).

Note: This exception may change its base class to a more general parse exception, once a standard exception with enough features, like line-column number locator and error offset locator are available. It shields users of the logic package from such a change and allows a smooth migration to the new exception once it is available from a standard organization.

Author:
André Platzer
See Also:
ParseException, org.xml.sax.SAXParseException, Serialized Form

Constructor Summary
ParseException(java.lang.String message, int errorOffset)
           
ParseException(java.lang.String message, int lineNumber, int columnNumber)
           
ParseException(java.lang.String message, int errorOffset, int lineNumber, int columnNumber)
           
ParseException(java.lang.String message, int errorOffset, int lineNumber, int columnNumber, java.lang.Throwable cause)
           
ParseException(java.lang.String message, int lineNumber, int columnNumber, java.lang.Throwable cause)
           
ParseException(java.lang.String message, int errorOffset, java.lang.Throwable cause)
           
 
Method Summary
 int getColumnNumber()
          The column number of the end of the text where the exception occurred.
 int getErrorOffset()
          Returns the position where the error was found.
 int getLineNumber()
          The line number of the end of the text where the exception occurred.
 java.lang.String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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(java.lang.String message,
                      int errorOffset,
                      int lineNumber,
                      int columnNumber,
                      java.lang.Throwable cause)

ParseException

public ParseException(java.lang.String message,
                      int lineNumber,
                      int columnNumber,
                      java.lang.Throwable cause)

ParseException

public ParseException(java.lang.String message,
                      int errorOffset,
                      java.lang.Throwable cause)

ParseException

public ParseException(java.lang.String message,
                      int errorOffset,
                      int lineNumber,
                      int columnNumber)

ParseException

public ParseException(java.lang.String message,
                      int lineNumber,
                      int columnNumber)

ParseException

public ParseException(java.lang.String message,
                      int errorOffset)
Method Detail

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getLineNumber

public int getLineNumber()
The line number of the end of the text where the exception occurred.

Returns:
An integer representing the line number, or -1 if none is available.

getColumnNumber

public int getColumnNumber()
The column number of the end of the text where the exception occurred. The first column in a line is position 1.

Returns:
An integer representing the column number, or -1 if none is available.

getErrorOffset

public int getErrorOffset()
Returns the position where the error was found.


Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.