/** * Converts the given ANTLR RecognitionException into a QuerySyntaxException. The RecognitionException * does not become the cause because ANTLR exceptions are not serializable. * * @param e The ANTLR exception * * @return The QuerySyntaxException */ public static QuerySyntaxException convert(RecognitionException e) { return convert( e, null ); }
@Override public void throwQueryException() throws QueryException { if ( getErrorCount() > 0 ) { if ( recognitionExceptions.size() > 0 ) { throw QuerySyntaxException.convert( recognitionExceptions.get( 0 ), hql ); } throw new QueryException( getErrorString(), hql ); } LOG.debug( "throwQueryException() : no errors" ); } }
public BasicExecutor(HqlSqlWalker walker, Queryable persister) { this.persister = persister; try { SqlGenerator gen = new SqlGenerator( walker.getSessionFactoryHelper().getFactory() ); gen.statement( walker.getAST() ); sql = gen.getSQL(); gen.getParseErrorHandler().throwQueryException(); parameterSpecifications = gen.getCollectedParameters(); } catch ( RecognitionException e ) { throw QuerySyntaxException.convert( e ); } }
throw QuerySyntaxException.convert( e, hql );
public static QuerySyntaxException convert(RecognitionException e) { return convert( e, null ); }
public static QuerySyntaxException convert(RecognitionException e) { return convert( e, null ); }
public void throwQueryException() throws QueryException { if ( getErrorCount() > 0 ) { if (recognitionExceptions.size() > 0) throw QuerySyntaxException.convert((RecognitionException)recognitionExceptions.get(0)); throw new QueryException(getErrorString()); } LOG.debug("throwQueryException() : no errors"); } }
public void throwQueryException() throws QueryException { if ( getErrorCount() > 0 ) { if (recognitionExceptions.size() > 0) throw QuerySyntaxException.convert((RecognitionException)recognitionExceptions.get(0)); throw new QueryException(getErrorString()); } LOG.debug("throwQueryException() : no errors"); } }
public BasicExecutor(HqlSqlWalker walker, Queryable persister) { super(walker, null); this.persister = persister; try { SqlGenerator gen = new SqlGenerator( getFactory() ); gen.statement( walker.getAST() ); sql = gen.getSQL(); gen.getParseErrorHandler().throwQueryException(); parameterSpecifications = gen.getCollectedParameters(); } catch ( RecognitionException e ) { throw QuerySyntaxException.convert( e ); } }
public BasicExecutor(HqlSqlWalker walker, Queryable persister) { super(walker, null); this.persister = persister; try { SqlGenerator gen = new SqlGenerator( getFactory() ); gen.statement( walker.getAST() ); sql = gen.getSQL(); gen.getParseErrorHandler().throwQueryException(); parameterSpecifications = gen.getCollectedParameters(); } catch ( RecognitionException e ) { throw QuerySyntaxException.convert( e ); } }
throw QuerySyntaxException.convert( e, hql );
throw QuerySyntaxException.convert( e, hql );