querysyntaxexception.java
来自「好东西,hibernate-3.2.0,他是一开元的树杖hibernate-3.」· Java 代码 · 共 35 行
JAVA
35 行
// $Id: QuerySyntaxException.java 9242 2006-02-09 12:37:36Z steveebersole $
package org.hibernate.hql.ast;
import antlr.RecognitionException;
import org.hibernate.QueryException;
/**
* Exception thrown when there is a syntax error in the HQL.
*
* @author josh
*/
public class QuerySyntaxException extends QueryException {
public QuerySyntaxException(String message) {
super( message );
}
public QuerySyntaxException(String message, String hql) {
this( message );
setQueryString( hql );
}
public static QuerySyntaxException convert(RecognitionException e) {
return convert( e, null );
}
public static QuerySyntaxException convert(RecognitionException e, String hql) {
String positionInfo = e.getLine() > 0 && e.getColumn() > 0
? " near line " + e.getLine() + ", column " + e.getColumn()
: "";
return new QuerySyntaxException( e.getMessage() + positionInfo, hql );
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?