try {
FOMBuilder builder = new FOMBuilder(getFomFactory(options), reader, options);
return getDocument(builder, base != null ? new IRI(base) : null, options);
} catch (Exception e) {
if (!(e instanceof ParseException))
e = new ParseException(e);
throw (ParseException)e;
}
}