diff --git a/app/src/main/java/io/xpipe/app/comp/store/GuiDsStoreCreator.java b/app/src/main/java/io/xpipe/app/comp/store/GuiDsStoreCreator.java index 659beef1..82cda7ce 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/GuiDsStoreCreator.java +++ b/app/src/main/java/io/xpipe/app/comp/store/GuiDsStoreCreator.java @@ -364,7 +364,7 @@ public class GuiDsStoreCreator extends MultiStepComp.Step> { entry.getValue().validateOrThrow(); finished.setValue(true); PlatformThread.runLaterIfNeeded(parent::next); - } catch (Exception ex) { + } catch (Throwable ex) { var newMessage = ExceptionConverter.convertMessage(ex); // Temporary fix for equal error message not showing up again if (Objects.equals(newMessage, messageProp.getValue())) { diff --git a/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java b/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java index a010d630..907073da 100644 --- a/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java +++ b/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java @@ -385,12 +385,12 @@ public class DataStoreEntry extends StorageElement { public void validate() { try { validateOrThrow(); - } catch (Exception ex) { + } catch (Throwable ex) { ErrorEvent.fromThrowable(ex).handle(); } } - public void validateOrThrow() throws Exception { + public void validateOrThrow() throws Throwable { try { store.checkComplete(); setInRefresh(true); diff --git a/app/src/main/java/io/xpipe/app/storage/DataStoreEntryRef.java b/app/src/main/java/io/xpipe/app/storage/DataStoreEntryRef.java index 1c2e45a6..eeb16066 100644 --- a/app/src/main/java/io/xpipe/app/storage/DataStoreEntryRef.java +++ b/app/src/main/java/io/xpipe/app/storage/DataStoreEntryRef.java @@ -14,7 +14,7 @@ public class DataStoreEntryRef { this.entry = entry; } - public void checkComplete() throws Exception { + public void checkComplete() throws Throwable { getStore().checkComplete(); } diff --git a/core/src/main/java/io/xpipe/core/store/DataStore.java b/core/src/main/java/io/xpipe/core/store/DataStore.java index 055417f1..eccacb69 100644 --- a/core/src/main/java/io/xpipe/core/store/DataStore.java +++ b/core/src/main/java/io/xpipe/core/store/DataStore.java @@ -19,12 +19,12 @@ public interface DataStore { try { checkComplete(); return true; - } catch (Exception ignored) { + } catch (Throwable ignored) { return false; } } - default void checkComplete() throws Exception {} + default void checkComplete() throws Throwable {} /** * Casts this instance to the required type without checking whether a cast is possible. diff --git a/ext/base/src/main/java/io/xpipe/ext/base/GroupStore.java b/ext/base/src/main/java/io/xpipe/ext/base/GroupStore.java index 44d1e839..315b0b0f 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/GroupStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/GroupStore.java @@ -8,7 +8,7 @@ public interface GroupStore extends DataStore { DataStoreEntryRef getParent(); @Override - default void checkComplete() throws Exception { + default void checkComplete() throws Throwable { var p = getParent(); if (p != null) { p.checkComplete(); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptStore.java b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptStore.java index 1bcbcb90..5af02040 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptStore.java @@ -7,7 +7,6 @@ import io.xpipe.app.storage.DataStoreEntryRef; import io.xpipe.app.util.Validators; import io.xpipe.core.process.ScriptSnippet; import io.xpipe.core.process.ShellControl; -import io.xpipe.core.process.ShellStoreState; import io.xpipe.core.process.SimpleScriptSnippet; import io.xpipe.core.store.DataStore; import io.xpipe.core.store.DataStoreState; @@ -179,7 +178,7 @@ public abstract class ScriptStore extends JacksonizedValue implements DataStore, } @Override - public void checkComplete() throws Exception { + public void checkComplete() throws Throwable { Validators.isType(group, ScriptGroupStore.class); if (scripts != null) { Validators.contentNonNull(scripts); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStore.java b/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStore.java index 677312a7..254e59d1 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/SimpleScriptStore.java @@ -75,7 +75,7 @@ public class SimpleScriptStore extends ScriptStore implements ScriptSnippet { private final ExecutionType executionType; @Override - public void checkComplete() throws Exception { + public void checkComplete() throws Throwable { Validators.nonNull(group); super.checkComplete(); Validators.nonNull(executionType);