Code example for QueryException

0
			if ( cacheSelectTokens ) {
				selectTokens.add( token );
			} 
			else { 
				if ( child == null ) {
					throw new QueryException( "query must begin with SELECT or FROM: " + token );
				} 
				else { 
					child.token( token, q );
				} 
			} 
		} 
 
	} 
 
	private void endChild(QueryTranslatorImpl q) throws QueryException {
		if ( child == null ) {
			//null child could occur for no from clause in a filter 
			cacheSelectTokens = false;
		}