Skip to content

Commit

Permalink
change to IOException since that is already thrown elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
trautmane committed May 7, 2024
1 parent 4d557f8 commit 057eddc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,16 @@ public final Void call() throws IOException, InterruptedException, ExecutionExce
}

private static void confirmGroupExists(final N5Reader n5, final String dataset)
throws IllegalArgumentException {
throws IOException {
if (!n5.exists(dataset)) {
throw new IllegalArgumentException("heightfield dataset does not exist: " + n5 + dataset);
throw new IOException("heightfield dataset does not exist: " + n5 + dataset);
}
}

private static void confirmGroupDoesntExist(final N5Reader n5, final String dataset)
throws IllegalArgumentException {
throws IOException {
if (n5.exists(dataset)) {
throw new IllegalArgumentException("heightfield dataset already exists: " + n5 + dataset);
throw new IOException("heightfield dataset already exists: " + n5 + dataset);
}
}
}

0 comments on commit 057eddc

Please sign in to comment.