public static void throwParseException(String msg, int line, int column) { throw new QueryParseException("Line " + line + ", column " + column + ": " + msg, line, column) ; } }
protected void finishBindingValueRow(int line, int col) { //if ( variables.size() != currentValueRow().size() ) if ( currentColumn+1 != variables.size() ) { String msg = String.format("Mismatch: %d variables but %d values",variables.size(), currentColumn+1) ; msg = QueryParseException.formatMessage(msg, line, col) ; throw new QueryParseException(msg, line , col) ; } }
public QueryParseException(String msg, Throwable cause, int line, int column) { //super(formatMessage(msg, line, column), cause) ; super(msg, cause) ; set(line, column) ; }
public static void expr(String exprStr, Binding binding) { try { Expr expr = ExprUtils.parse(exprStr, ARQConstants.getGlobalPrefixMap()) ; evalPrint(expr, binding) ; } catch (QueryParseException ex) { System.err.println("Parse error: "+ex.getMessage()) ; return ; } }
logger.warn("Could not parse Sync query. Please provide a relevant query. {}", qpe.getLocalizedMessage()); if (! isBulkWithErrors){ for (String uri : bulk){ for (String uri : bulk){ ArrayList<String> currentErrorBulk = new ArrayList<String>(); urisWithErrors.add(String.format("%s %s", uri, qpe.getLocalizedMessage()));
public static void expr(String exprStr, Binding binding) { try { Expr expr = ExprUtils.parse(exprStr, ARQConstants.getGlobalPrefixMap()) ; evalPrint(expr, binding) ; } catch (QueryParseException ex) { System.err.println("Parse error: "+ex.getMessage()) ; return ; } }
logger.warn( "Could not parse [{}]. Please provide a relevant query. {}", rdfQuery, qpe.getLocalizedMessage()); return null;
public static void throwParseException(String msg, int line, int column) { throw new QueryParseException("Line " + line + ", column " + column + ": " + msg, line, column) ; }
protected void finishDataBlockValueRow(int line, int col) { //if ( variables.size() != currentValueRow().size() ) if ( currentColumn+1 != variables.size() ) { String msg = String.format("Mismatch: %d variables but %d values",variables.size(), currentColumn+1) ; msg = QueryParseException.formatMessage(msg, line, col) ; throw new QueryParseException(msg, line , col) ; } }
System.err.println(ex.getMessage()) ; return ;
public QueryParseException(String msg, Throwable cause, int line, int column) { //super(formatMessage(msg, line, column), cause) ; super(msg, cause) ; set(line, column) ; }
private static QueryParseException makeException(String msg, int line, int column) { return new QueryParseException(msg, line, column) ; }
throw new TerminationException(99) ; } catch (QueryParseException parseEx) { System.err.println(parseEx.getMessage()) ; throw new TerminationException(2) ; } catch (QueryException qEx) {
private static QueryParseException makeException(String msg, int line, int column) { return new QueryParseException(msg, line, column) ; }
System.err.println(parseEx.getMessage()) ; throw new TerminationException(2) ;
public static void throwParseException(String msg) { throw new QueryParseException(msg, -1, -1) ; }
System.err.println("Parse error: "+ex.getMessage()) ; throw new TerminationException(2) ;
private int makeMask(String modifiers) { if ( modifiers == null ) return 0 ; int newMask = 0 ; for ( int i = 0 ; i < modifiers.length() ; i++ ) { switch(modifiers.charAt(i)) { //case 'i' : newMask |= Pattern.CASE_INSENSITIVE; break ; case 'i' : // Need both (Java 1.4) newMask |= Pattern.UNICODE_CASE ; newMask |= Pattern.CASE_INSENSITIVE; break ; case 'm' : newMask |= Pattern.MULTILINE ; break ; case 's' : newMask |= Pattern.DOTALL ; break ; //case 'x' : newMask |= Pattern.; break ; default : throw new QueryParseException("Illegal flag in regex modifiers: "+modifiers.charAt(i), -1, -1) ; } } return newMask ; }
System.err.println("Parse error: "+ex.getMessage()) ; throw new TerminationException(2) ;
public static int makeMask(String modifiers) { if ( modifiers == null ) return 0 ; int newMask = 0 ; for ( int i = 0 ; i < modifiers.length() ; i++ ) { switch(modifiers.charAt(i)) { //case 'i' : newMask |= Pattern.CASE_INSENSITIVE; break ; case 'i' : // Need both (Java 1.4) newMask |= Pattern.UNICODE_CASE ; newMask |= Pattern.CASE_INSENSITIVE; break ; case 'm' : newMask |= Pattern.MULTILINE ; break ; case 's' : newMask |= Pattern.DOTALL ; break ; //case 'x' : newMask |= Pattern.; break ; default : throw new QueryParseException("Illegal flag in regex modifiers: "+modifiers.charAt(i), -1, -1) ; } } return newMask ; }