From fcec1ac812f757abec940d036a5981f40a3f8ef4 Mon Sep 17 00:00:00 2001 From: ShadelessFox Date: Wed, 27 Dec 2023 20:33:15 +0300 Subject: [PATCH] Application: Improve progress dialog error reporting --- .../java/com/shade/platform/ui/dialogs/ProgressDialog.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/platform-ui/src/main/java/com/shade/platform/ui/dialogs/ProgressDialog.java b/modules/platform-ui/src/main/java/com/shade/platform/ui/dialogs/ProgressDialog.java index 9a8ce776..f734ce23 100644 --- a/modules/platform-ui/src/main/java/com/shade/platform/ui/dialogs/ProgressDialog.java +++ b/modules/platform-ui/src/main/java/com/shade/platform/ui/dialogs/ProgressDialog.java @@ -80,6 +80,9 @@ public static Optional 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();