Show failure messages when launching external applications

This commit is contained in:
crschnick 2024-01-26 12:15:15 +00:00
parent 715d36336c
commit a11ad4d486
2 changed files with 1 additions and 8 deletions

View file

@ -62,8 +62,6 @@ public class FileOpener {
editor.launch(Path.of(file).toRealPath());
} catch (Exception e) {
ErrorEvent.fromThrowable(e)
.description("Unable to launch editor " + editor.toTranslatedString()
+ ".\nMaybe try to use a different editor in the settings.")
.expected()
.handle();
}

View file

@ -9,8 +9,6 @@ import io.xpipe.app.storage.DataStoreEntry;
import io.xpipe.core.process.ProcessControl;
import io.xpipe.core.process.TerminalInitScriptConfig;
import java.io.IOException;
public class TerminalHelper {
public static void open(String title, ProcessControl cc) throws Exception {
@ -34,10 +32,7 @@ public class TerminalHelper {
try {
type.launch(config);
} catch (Exception ex) {
throw ErrorEvent.unreportable(new IOException(
"Unable to launch terminal " + type.toTranslatedString() + ": " + ex.getMessage()
+ ".\nMaybe try to use a different terminal in the settings.",
ex));
throw ErrorEvent.unreportable(ex);
}
}
}