edu.cs.ai.kreator.exceptions
Class ParsingException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by edu.cs.ai.kreator.exceptions.KreatorException
              extended by edu.cs.ai.kreator.exceptions.ParsingException
All Implemented Interfaces:
ParsingErrorInfo, java.io.Serializable

public class ParsingException
extends KreatorException
implements ParsingErrorInfo

Author:
Marc Finthammer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.cs.ai.kreator.exceptions.ParsingErrorInfo
ParsingErrorInfo.ErrorType
 
Constructor Summary
ParsingException(int line, int column, java.lang.String description, ParsingErrorInfo.ErrorType errorType)
           
ParsingException(ParsingRuntimeException cause)
           
ParsingException(org.antlr.runtime.RecognitionException cause, java.lang.String description, ParsingErrorInfo.ErrorType errorType)
           
ParsingException(java.lang.String message)
           
ParsingException(java.lang.String message, java.lang.Throwable cause)
           
 
Method Summary
 int getColumn()
          Returns the column in the line where the error occurred.
 ParsingErrorInfo.ErrorType getErrorType()
          Returns the type of the error.
 int getLine()
          Returns the line in the file where the error occurred.
 java.lang.String getParserErrorDescription()
          Returns an ANTLR generated description of the error.
 boolean isInfoAvailable()
          Returns whether additional error information (line, column, description, error type) is available.
 
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

ParsingException

public ParsingException(java.lang.String message)

ParsingException

public ParsingException(java.lang.String message,
                        java.lang.Throwable cause)

ParsingException

public ParsingException(int line,
                        int column,
                        java.lang.String description,
                        ParsingErrorInfo.ErrorType errorType)

ParsingException

public ParsingException(org.antlr.runtime.RecognitionException cause,
                        java.lang.String description,
                        ParsingErrorInfo.ErrorType errorType)

ParsingException

public ParsingException(ParsingRuntimeException cause)
Method Detail

getLine

public int getLine()
Description copied from interface: ParsingErrorInfo
Returns the line in the file where the error occurred.

Specified by:
getLine in interface ParsingErrorInfo
Returns:
the line

getColumn

public int getColumn()
Description copied from interface: ParsingErrorInfo
Returns the column in the line where the error occurred.

Specified by:
getColumn in interface ParsingErrorInfo
Returns:
the column

getParserErrorDescription

public java.lang.String getParserErrorDescription()
Description copied from interface: ParsingErrorInfo
Returns an ANTLR generated description of the error.

Specified by:
getParserErrorDescription in interface ParsingErrorInfo
Returns:
the parserErrorDescription

isInfoAvailable

public boolean isInfoAvailable()
Description copied from interface: ParsingErrorInfo
Returns whether additional error information (line, column, description, error type) is available.

Specified by:
isInfoAvailable in interface ParsingErrorInfo
Returns:
the infoAvailable

getErrorType

public ParsingErrorInfo.ErrorType getErrorType()
Description copied from interface: ParsingErrorInfo
Returns the type of the error.

Specified by:
getErrorType in interface ParsingErrorInfo
Returns:
the errorType