Skip to content

Commit

Permalink
Catch all exceptions, not only IOExceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
henrietteharmse committed Aug 9, 2024
1 parent b5dfa14 commit 80ae2f3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private String urlToFilename(String url) {
static final Set<OntologyNode.NodeType> propertyTypes = new TreeSet<>(Set.of(ENTITY, PROPERTY));
static final Set<OntologyNode.NodeType> 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();

Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 80ae2f3

Please sign in to comment.