Skip to content

Commit

Permalink
Fixed errors thrown on the schematic callback completely ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Apr 30, 2022
1 parent 4fc7313 commit 79f93f4
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -89,8 +89,13 @@ public void submitUpdate(Runnable onFinish, Consumer<Throwable> onFailure) {

if (onFinish != null) {
CompletableFuture.allOf(chunkFutures.toArray(new CompletableFuture[0])).whenComplete((v, error) -> {
if (!failed)
onFinish.run();
try {
if (!failed)
onFinish.run();
} catch (Throwable error2) {
if (onFailure != null)
onFailure.accept(error2);
}
});
}
} catch (Throwable error) {
Expand Down

0 comments on commit 79f93f4

Please sign in to comment.