diff --git a/dataload/rdf2json/src/main/java/uk/ac/ebi/rdf2json/OntologyGraph.java b/dataload/rdf2json/src/main/java/uk/ac/ebi/rdf2json/OntologyGraph.java index 18242e77d..9ad969bae 100644 --- a/dataload/rdf2json/src/main/java/uk/ac/ebi/rdf2json/OntologyGraph.java +++ b/dataload/rdf2json/src/main/java/uk/ac/ebi/rdf2json/OntologyGraph.java @@ -287,7 +287,7 @@ private String urlToFilename(String url) { static final Set propertyTypes = new TreeSet<>(Set.of(ENTITY, PROPERTY)); static final Set individualTypes = new TreeSet<>(Set.of(ENTITY, INDIVIDUAL)); - public void write(JsonWriter writer) throws IOException { + public void write(JsonWriter writer) throws Throwable { String ontologyId = ((String) config.get("id")).toLowerCase(); @@ -387,8 +387,9 @@ public void write(JsonWriter writer) throws IOException { writer.endObject(); - } catch (IOException ioe) { - logger.error("Error in writing ontology with id = {}", ontologyId, ioe); + } catch (Throwable t) { + logger.error("Error in writing ontology with id = {}", ontologyId, t); + throw t; } }