query.setStrict(true) ;
parser.setQuery(query) ;
return parser.PathUnit() ;
} catch (com.hp.hpl.jena.sparql.lang.arq.ParseException ex)
{
throw new QueryParseException(ex.getMessage(),
ex.currentToken.beginLine,
ex.currentToken.beginColumn
) ; }
catch (com.hp.hpl.jena.sparql.lang.arq.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 (QueryException 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.warn(PathParser.class, "Unexpected throwable: ",th) ;
throw new QueryException(th.getMessage(), th) ;