Package org.basex.query
Class QueryException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.basex.query.QueryException
- All Implemented Interfaces:
Serializable
Thrown to indicate an exception during the parsing or evaluation of a query.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQueryException(String message) Constructor, specifying a simple error message.QueryException(Throwable cause) Constructor, specifying an exception or error.QueryException(InputInfo info, QueryError error, Object... ext) Default constructor.QueryException(InputInfo info, QNm name, String message, Object... ext) Constructor, specifying the error code and message as string. -
Method Summary
Modifier and TypeMethodDescriptionfinal QueryExceptionAdds an input info to the stack.final intcolumn()Returns the error column.final QueryErrorerror()Returns the error.final Stringfile()Returns the file.final InputInfoinfo()Returns the input info.final QueryExceptionSets input info.booleanChecks if this exception can be caught by atry/catchexpression.final intline()Returns the error line.final intReturns the marked error column.final QueryExceptionMakes this exception uncatchable by atry/catchexpression.final QNmqname()Returns the error name.final StringListsuggest()Returns suggestions for code suggestions.final QueryExceptionsuggest(InputParser qp, StringList sug) Sets code suggestions.final Valuevalue()Returns the error value.final QueryExceptionSets the error value.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
QueryException
Constructor, specifying an exception or error.QueryError.BASEX_ERROR_Xwill be set as error code.- Parameters:
cause- exception or error
-
QueryException
Constructor, specifying a simple error message.QueryError.BASEX_ERROR_Xwill be set as error code.- Parameters:
message- error message
-
QueryException
Default constructor.- Parameters:
info- input info (can benull)error- error referenceext- error extension
-
QueryException
Constructor, specifying the error code and message as string.- Parameters:
info- input info (can benull)name- error codemessage- error messageext- error extension
-
-
Method Details
-
column
public final int column()Returns the error column.- Returns:
- error column
-
markedColumn
public final int markedColumn()Returns the marked error column.- Returns:
- marked error column
-
line
public final int line()Returns the error line.- Returns:
- error line
-
file
Returns the file.- Returns:
- error line
-
suggest
Returns suggestions for code suggestions.- Returns:
- suggestions
-
suggest
Sets code suggestions.- Parameters:
qp- query parsersug- code suggestions- Returns:
- self reference
-
add
Adds an input info to the stack.- Parameters:
ii- input info- Returns:
- self reference
-
info
Sets input info.- Parameters:
ii- input info- Returns:
- self reference
-
info
Returns the input info.- Returns:
- input info
-
value
Sets the error value.- Parameters:
val- error value- Returns:
- self reference
-
qname
Returns the error name.- Returns:
- error name
-
error
Returns the error.- Returns:
- error
-
value
Returns the error value.- Returns:
- error value
-
getLocalizedMessage
- Overrides:
getLocalizedMessagein classThrowable
-
getMessage
- Overrides:
getMessagein classThrowable
-
isCatchable
public boolean isCatchable()Checks if this exception can be caught by atry/catchexpression.- Returns:
- result of check
-
notCatchable
Makes this exception uncatchable by atry/catchexpression.- Returns:
- self reference for convenience
-