com.metamatrix.api.exception.query
Class QueryParserException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.metamatrix.core.MetaMatrixCoreException
              extended by com.metamatrix.api.exception.MetaMatrixException
                  extended by com.metamatrix.api.exception.MetaMatrixProcessingException
                      extended by com.metamatrix.api.exception.query.QueryProcessingException
                          extended by com.metamatrix.api.exception.query.QueryParserException
All Implemented Interfaces:
java.io.Serializable

public class QueryParserException
extends QueryProcessingException

Thrown when a query cannot be parsed. This is most likely due to not following the Query Parser grammar, which defines how queries are parsed.

See Also:
Serialized Form

Constructor Summary
QueryParserException()
          No-arg constructor required by Externalizable semantics.
QueryParserException(java.lang.String message)
          Construct an instance with the message specified.
QueryParserException(java.lang.String code, java.lang.String message)
          Construct an instance with the message and error code specified.
QueryParserException(java.lang.Throwable e, java.lang.String message)
          Construct an instance from a message and an exception to chain to this one.
QueryParserException(java.lang.Throwable e, java.lang.String code, java.lang.String message)
          Construct an instance from a message and a code and an exception to chain to this one.
 
Method Summary
 int getColumn()
          Get column error occurred on in string being parsed.
 int getLine()
          Get line error occurred on in string being parsed.
 boolean isLocationKnown()
          Determine if location of error in string being parsed is known.
 void readExternal(java.io.ObjectInput in)
           
 void setErrorLocation(int line, int column)
          Set location of error
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class com.metamatrix.api.exception.MetaMatrixException
getChild, getCode, getFullMessage, getMessage, setCode, toString
 
Methods inherited from class com.metamatrix.core.MetaMatrixCoreException
getCause, initCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryParserException

public QueryParserException()
No-arg constructor required by Externalizable semantics.


QueryParserException

public QueryParserException(java.lang.String message)
Construct an instance with the message specified.

Parameters:
message - A message describing the exception

QueryParserException

public QueryParserException(java.lang.String code,
                            java.lang.String message)
Construct an instance with the message and error code specified.

Parameters:
message - A message describing the exception
code - The error code

QueryParserException

public QueryParserException(java.lang.Throwable e,
                            java.lang.String message)
Construct an instance from a message and an exception to chain to this one.

Parameters:
message - A message describing the exception
e - An exception to nest within this one

QueryParserException

public QueryParserException(java.lang.Throwable e,
                            java.lang.String code,
                            java.lang.String message)
Construct an instance from a message and a code and an exception to chain to this one.

Parameters:
e - An exception to nest within this one
message - A message describing the exception
code - A code denoting the exception
Method Detail

setErrorLocation

public void setErrorLocation(int line,
                             int column)
Set location of error

Parameters:
line - Line error occurred on in input
column - Column error occurred on in input

isLocationKnown

public boolean isLocationKnown()
Determine if location of error in string being parsed is known. If so, the line and column can be obtained with getLine() and getColumn().

Returns:
True if location is known

getLine

public int getLine()
Get line error occurred on in string being parsed.

Returns:
Line error occurred on in input string

getColumn

public int getColumn()
Get column error occurred on in string being parsed.

Returns:
Column error occurred on in input string

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Overrides:
readExternal in class MetaMatrixException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
Externalizable.readExternal(java.io.ObjectInput)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Overrides:
writeExternal in class MetaMatrixException
Throws:
java.io.IOException
See Also:
Externalizable.writeExternal(java.io.ObjectOutput)


Copyright © 2009. All Rights Reserved.