use of org.apache.jena.n3.turtle.parser.TokenMgrError in project jena by apache.
the class ParserTurtle method parse.
public void parse(Graph graph, String baseURI, Reader reader) {
// Nasty things happen if the reader is not UTF-8.
try {
TurtleParser parser = new TurtleParser(reader);
parser.setEventHandler(new TurtleRDFGraphInserter(graph));
parser.setBaseURI(baseURI);
parser.parse();
} catch (ParseException | TokenMgrError ex) {
throw new TurtleParseException(ex.getMessage());
} catch (TurtleParseException ex) {
throw ex;
} catch (Throwable th) {
throw new TurtleParseException(th.getMessage(), th);
}
}
Aggregations