mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Show failure messages when launching external applications
This commit is contained in:
parent
715d36336c
commit
a11ad4d486
2 changed files with 1 additions and 8 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue