1 package org.hibernate.hql.ast; 3 4 import antlr.RecognitionException; 5 import org.hibernate.QueryException; 6 7 12 public class QuerySyntaxException extends QueryException { 13 14 public QuerySyntaxException(RecognitionException e) { 15 super( e.getMessage() + ( 16 ( e.getLine() > 0 && e.getColumn() > 0 ) ? 17 ( " near line " + e.getLine() + ", column " + e.getColumn() ) : "" 18 ), e ); 19 } 20 21 public QuerySyntaxException(RecognitionException e, String hql) { 22 super( e.getMessage() + ( 23 ( e.getLine() > 0 && e.getColumn() > 0 ) ? 24 ( " near line " + e.getLine() + ", column " + e.getColumn() ) : "" 25 ), e ); 26 setQueryString( hql ); 27 } 28 29 } 30 | Popular Tags |