use of org.apache.jena.sparql.lang.sparql_11.SPARQLParser11 in project jena by apache.
the class ParserSPARQL11Update method _parse.
private void _parse(UpdateSink sink, Reader r) {
SPARQLParser11 parser = null;
try {
parser = new SPARQLParser11(r);
parser.setUpdateSink(sink);
parser.UpdateUnit();
} catch (org.apache.jena.sparql.lang.sparql_11.ParseException ex) {
throw new QueryParseException(ex.getMessage(), ex.currentToken.beginLine, ex.currentToken.beginColumn);
} catch (org.apache.jena.sparql.lang.sparql_11.TokenMgrError tErr) {
// Last valid token : not the same as token error message - but this should not happen
int col = parser.token.endColumn;
int line = parser.token.endLine;
throw new QueryParseException(tErr.getMessage(), line, col);
} catch (UpdateException ex) {
throw ex;
} catch (JenaException ex) {
throw new QueryException(ex.getMessage(), ex);
} catch (Error err) {
// The token stream can throw errors.
throw new QueryParseException(err.getMessage(), err, -1, -1);
} catch (Throwable th) {
Log.error(this, "Unexpected throwable: ", th);
throw new QueryException(th.getMessage(), th);
}
}
Aggregations