edu.cs.ai.kreator.exceptions.runtime
Class ParsingRuntimeException

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

public class ParsingRuntimeException
extends java.lang.RuntimeException
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
ParsingRuntimeException(int line, int column, java.lang.String description, ParsingErrorInfo.ErrorType errorType)
           
ParsingRuntimeException(org.antlr.runtime.RecognitionException cause, java.lang.String description, ParsingErrorInfo.ErrorType errorType)
           
ParsingRuntimeException(java.lang.String message)
           
 
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

ParsingRuntimeException

public ParsingRuntimeException(java.lang.String message)

ParsingRuntimeException

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

ParsingRuntimeException

public ParsingRuntimeException(org.antlr.runtime.RecognitionException cause,
                               java.lang.String description,
                               ParsingErrorInfo.ErrorType errorType)
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