Skip to content

Commit

Permalink
Application: Improve progress dialog error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed Dec 27, 2023
1 parent d00844e commit fcec1ac
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ public static <T, E extends Exception> Optional<T> showProgressDialog(@Nullable
try {
return Optional.ofNullable((T) executor.get());
} catch (ExecutionException e) {
if (e.getCause() instanceof Error error) {
throw error;
}
throw (E) e.getCause();
} catch (CancellationException | InterruptedException e) {
return Optional.empty();
Expand Down

0 comments on commit fcec1ac

Please sign in to comment.