From a11ad4d48603f1786f8d3518e023f9bc5574db27 Mon Sep 17 00:00:00 2001 From: crschnick Date: Fri, 26 Jan 2024 12:15:15 +0000 Subject: [PATCH] Show failure messages when launching external applications --- app/src/main/java/io/xpipe/app/util/FileOpener.java | 2 -- app/src/main/java/io/xpipe/app/util/TerminalHelper.java | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/FileOpener.java b/app/src/main/java/io/xpipe/app/util/FileOpener.java index 811bc71b..ea53ecb1 100644 --- a/app/src/main/java/io/xpipe/app/util/FileOpener.java +++ b/app/src/main/java/io/xpipe/app/util/FileOpener.java @@ -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(); } diff --git a/app/src/main/java/io/xpipe/app/util/TerminalHelper.java b/app/src/main/java/io/xpipe/app/util/TerminalHelper.java index 1bed9f53..75c18a33 100644 --- a/app/src/main/java/io/xpipe/app/util/TerminalHelper.java +++ b/app/src/main/java/io/xpipe/app/util/TerminalHelper.java @@ -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); } } }