org.basex.query
Class QueryException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.basex.query.QueryException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
XQException

public class QueryException
extends java.lang.Exception

This class indicates exceptions during query parsing or evaluation.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Christian Gruen
See Also:
Serialized Form

Constructor Summary
QueryException(java.lang.Object s, java.lang.Object... e)
          Constructor.
 
Method Summary
 java.lang.String code()
          Returns the error code.
 int col()
          Returns the error column.
 StringList complete()
          Possible completions.
 void complete(QueryParser qp, StringList comp)
          Sets code completions.
 java.lang.String extended()
          Returns an extended error message.
 java.lang.String getMessage()
           
 int line()
          Returns the error line.
 void pos(QueryParser parser)
          Sets the error position.
 java.lang.String simple()
          Returns the simple error message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryException

public QueryException(java.lang.Object s,
                      java.lang.Object... e)
Constructor.

Parameters:
s - message
e - message extension
Method Detail

code

public final java.lang.String code()
Returns the error code.

Returns:
position

line

public final int line()
Returns the error line.

Returns:
error line

complete

public final StringList complete()
Possible completions.

Returns:
error line

col

public final int col()
Returns the error column.

Returns:
error column

pos

public final void pos(QueryParser parser)
Sets the error position.

Parameters:
parser - parser

complete

public final void complete(QueryParser qp,
                           StringList comp)
Sets code completions.

Parameters:
qp - query parser
comp - completions

simple

public final java.lang.String simple()
Returns the simple error message.

Returns:
string

extended

public final java.lang.String extended()
Returns an extended error message.

Returns:
string

getMessage

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