public static CronTabList create(@Nonnull String format, Hash hash) throws ANTLRException { Vector<CronTab> r = new Vector<>(); int lineNumber = 0; String timezone = null; for (String line : format.split("\\r?\\n")) { lineNumber++; line = line.trim(); if(lineNumber == 1 && line.startsWith("TZ=")) { timezone = getValidTimezone(line.replace("TZ=","")); if(timezone != null) { LOGGER.log(Level.CONFIG, "CRON with timezone {0}", timezone); } else { throw new ANTLRException("Invalid or unsupported timezone '" + timezone + "'"); } continue; } if(line.length()==0 || line.startsWith("#")) continue; // ignorable line try { r.add(new CronTab(line,lineNumber,hash,timezone)); } catch (ANTLRException e) { throw new ANTLRException(Messages.CronTabList_InvalidInput(line,e.toString()),e); } } return new CronTabList(r); }
public static CronTabList create(String format) throws ANTLRException { Vector<CronTab> r = new Vector<CronTab>(); int lineNumber = 0; for (String line : format.split("\\r?\\n")) { lineNumber++; line = line.trim(); if(line.length()==0 || line.startsWith("#")) continue; // ignorable line try { r.add(new CronTab(line,lineNumber)); } catch (ANTLRException e) { throw new ANTLRException(Messages.CronTabList_InvalidInput(line,e.toString()),e); } } return new CronTabList(r); } }
public static CronTabList create(String format) throws ANTLRException { Vector<CronTab> r = new Vector<CronTab>(); int lineNumber = 0; for (String line : format.split("\\r?\\n")) { lineNumber++; line = line.trim(); if(line.length()==0 || line.startsWith("#")) continue; // ignorable line try { r.add(new CronTab(line,lineNumber)); } catch (ANTLRException e) { throw new ANTLRException(Messages.CronTabList_InvalidInput(line,e.toString()),e); } } return new CronTabList(r); } }
public static CronTabList create(@Nonnull String format, Hash hash) throws ANTLRException { Vector<CronTab> r = new Vector<>(); int lineNumber = 0; String timezone = null; for (String line : format.split("\\r?\\n")) { lineNumber++; line = line.trim(); if(lineNumber == 1 && line.startsWith("TZ=")) { timezone = getValidTimezone(line.replace("TZ=","")); if(timezone != null) { LOGGER.log(Level.CONFIG, "CRON with timezone {0}", timezone); } else { throw new ANTLRException("Invalid or unsupported timezone '" + timezone + "'"); } continue; } if(line.length()==0 || line.startsWith("#")) continue; // ignorable line try { r.add(new CronTab(line,lineNumber,hash,timezone)); } catch (ANTLRException e) { throw new ANTLRException(Messages.CronTabList_InvalidInput(line,e.toString()),e); } } return new CronTabList(r); }
public static CronTabList create(String format) throws ANTLRException { Vector<CronTab> r = new Vector<CronTab>(); int lineNumber = 0; for (String line : format.split("\\r?\\n")) { lineNumber++; line = line.trim(); if(line.length()==0 || line.startsWith("#")) continue; // ignorable line try { r.add(new CronTab(line,lineNumber)); } catch (ANTLRException e) { throw new ANTLRException(Messages.CronTabList_InvalidInput(line,e.toString()),e); } } return new CronTabList(r); } }
public final void whereClause() throws RecognitionException, TokenStreamException, ANTLRException { returnAST = null; ASTPair currentAST = new ASTPair(); AST whereClause_AST = null; try { // for error handling match( WHERE ); searchCondition(); astFactory.addASTChild( currentAST, returnAST ); whereClause_AST = ( AST ) currentAST.root; } catch ( ANTLRException ex ) { if ( inputState.guessing == 0 ) { reportError( ex.toString() ); isCorrectStatement = false; throw new ANTLRException( "this was an invalid IQL statement" ); } else { throw ex; } } returnAST = whereClause_AST; }
public final void whereClause() throws RecognitionException, TokenStreamException, ANTLRException { returnAST = null; ASTPair currentAST = new ASTPair(); AST whereClause_AST = null; try { // for error handling match(WHERE); searchCondition(); astFactory.addASTChild(currentAST, returnAST); whereClause_AST = (AST)currentAST.root; } catch (ANTLRException ex) { if (inputState.guessing==0) { reportError(ex.toString()); isCorrectStatement = false; throw new ANTLRException("this was an invalid IQL statement"); } else { throw ex; } } returnAST = whereClause_AST; }
public final void selectClause() throws RecognitionException, TokenStreamException, ANTLRException { returnAST = null; ASTPair currentAST = new ASTPair(); AST selectClause_AST = null; try { // for error handling AST tmp3_AST = null; tmp3_AST = astFactory.create( LT( 1 ) ); astFactory.addASTChild( currentAST, tmp3_AST ); match( SELECT ); searchObject(); astFactory.addASTChild( currentAST, returnAST ); selectClause_AST = ( AST ) currentAST.root; } catch ( ANTLRException ex ) { if ( inputState.guessing == 0 ) { reportError( ex.toString() ); isCorrectStatement = false; throw new ANTLRException( "this was an invalid IQL statement" ); } else { throw ex; } } returnAST = selectClause_AST; }
public final void selectClause() throws RecognitionException, TokenStreamException, ANTLRException { returnAST = null; ASTPair currentAST = new ASTPair(); AST selectClause_AST = null; try { // for error handling AST tmp3_AST = null; tmp3_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp3_AST); match(SELECT); searchObject(); astFactory.addASTChild(currentAST, returnAST); selectClause_AST = (AST)currentAST.root; } catch (ANTLRException ex) { if (inputState.guessing==0) { reportError(ex.toString()); isCorrectStatement = false; throw new ANTLRException("this was an invalid IQL statement"); } else { throw ex; } } returnAST = selectClause_AST; }
throw new ANTLRException("this was an invalid IQL statement");
throw new ANTLRException( "this was an invalid IQL statement" );
throw new ANTLRException( "this was an invalid IQL statement" );
throw new ANTLRException("this was an invalid IQL statement");
throw new ANTLRException( "this was an invalid IQL statement" );
throw new ANTLRException("this was an invalid IQL statement");
throw new ANTLRException( "this was an invalid IQL statement" );
throw new ANTLRException( "this was an invalid IQL statement" );
throw new ANTLRException("this was an invalid IQL statement");
throw new ANTLRException("this was an invalid IQL statement");
throw new ANTLRException("this was an invalid IQL statement");