mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Widen acceptable store exceptions
This commit is contained in:
parent
af8904ea7a
commit
debe83d2f4
7 changed files with 9 additions and 10 deletions
|
@ -364,7 +364,7 @@ public class GuiDsStoreCreator extends MultiStepComp.Step<CompStructure<?>> {
|
|||
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())) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -14,7 +14,7 @@ public class DataStoreEntryRef<T extends DataStore> {
|
|||
this.entry = entry;
|
||||
}
|
||||
|
||||
public void checkComplete() throws Exception {
|
||||
public void checkComplete() throws Throwable {
|
||||
getStore().checkComplete();
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -8,7 +8,7 @@ public interface GroupStore<T extends DataStore> extends DataStore {
|
|||
DataStoreEntryRef<? extends T> getParent();
|
||||
|
||||
@Override
|
||||
default void checkComplete() throws Exception {
|
||||
default void checkComplete() throws Throwable {
|
||||
var p = getParent();
|
||||
if (p != null) {
|
||||
p.checkComplete();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue