org.codehaus.jparsec.error
Class ParserException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.codehaus.jparsec.error.ParserException
All Implemented Interfaces:
Serializable

public class ParserException
extends RuntimeException

Is thrown when any grammar error happens or any exception is thrown during parsing.

Author:
Ben Yu
See Also:
Serialized Form

Constructor Summary
ParserException(ParseErrorDetails details, String moduleName, Location location)
          Creates a ParserException object.
ParserException(Throwable cause, ParseErrorDetails details, String moduleName, Location location)
          Creates a ParserException object.
 
Method Summary
 ParseErrorDetails getErrorDetails()
          Returns the detailed description of the error, or null if none.
 Location getLocation()
          Returns the location of the error.
 String getModuleName()
          Returns the module name, or null if none.
 
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

ParserException

public ParserException(ParseErrorDetails details,
                       String moduleName,
                       Location location)
Creates a ParserException object.

Parameters:
details - the ParseErrorDetails that describes the error details.
moduleName - the module name.
location - the error location.

ParserException

public ParserException(Throwable cause,
                       ParseErrorDetails details,
                       String moduleName,
                       Location location)
Creates a ParserException object.

Parameters:
cause - the exception that causes this.
details - the ParseErrorDetails that describes the error details.
moduleName - the module name.
location - the location.
Method Detail

getErrorDetails

public ParseErrorDetails getErrorDetails()
Returns the detailed description of the error, or null if none.


getModuleName

public String getModuleName()
Returns the module name, or null if none.


getLocation

public Location getLocation()
Returns the location of the error.



Copyright © 2014. All rights reserved.