public class QuerySyntaxException extends QueryException
Modifier | Constructor and Description |
---|---|
|
QuerySyntaxException(String message)
Constructs a QuerySyntaxException
|
|
QuerySyntaxException(String message,
String hql)
Constructs a QuerySyntaxException
|
protected |
QuerySyntaxException(String message,
String queryString,
Exception cause)
Intended for use solely from
generateQueryException(String) |
Modifier and Type | Method and Description |
---|---|
static QuerySyntaxException |
convert(antlr.RecognitionException e)
Converts the given ANTLR RecognitionException into a QuerySyntaxException.
|
static QuerySyntaxException |
convert(antlr.RecognitionException e,
String hql)
Converts the given ANTLR RecognitionException into a QuerySyntaxException.
|
protected QueryException |
generateQueryException(String queryString)
Called from
QueryException.wrapWithQueryString(String) when we really need to generate a new QueryException
(or subclass). |
getMessage, getOriginalMessage, getQueryString, wrapWithQueryString
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public QuerySyntaxException(String message)
message
- Message explaining the condition that led to the exceptionpublic QuerySyntaxException(String message, String hql)
message
- Message explaining the condition that led to the exceptionhql
- The hql query that was being parsed/analyzedprotected QuerySyntaxException(String message, String queryString, Exception cause)
generateQueryException(String)
message
- Message explaining the condition that led to the exceptionqueryString
- The hql query that was being parsed/analyzedcause
- The cause, generally another QuerySyntaxExceptionpublic static QuerySyntaxException convert(antlr.RecognitionException e)
e
- The ANTLR exceptionpublic static QuerySyntaxException convert(antlr.RecognitionException e, String hql)
e
- The ANTLR exceptionhql
- The query stringprotected QueryException generateQueryException(String queryString)
QueryException
QueryException.wrapWithQueryString(String)
when we really need to generate a new QueryException
(or subclass).
NOTE : implementors should take care to use QueryException.getOriginalMessage()
for the message, not
QueryException.getMessage()
generateQueryException
in class QueryException
queryString
- The query stringQueryException.getOriginalMessage()
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.