From 14db21211f186e0b6ffa276dd1db758a6de805ed Mon Sep 17 00:00:00 2001 From: zkitefly Date: Mon, 19 Feb 2024 15:47:52 +0800 Subject: [PATCH] updata Exitwaiter (#2813) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加检测日志 参考自 https://github.com/Hex-Dragon/PCL2/blob/8c8b1066bff6476a14437a14bc16a281e25145bd/Plain%20Craft%20Launcher%202/Modules/Minecraft/ModWatcher.vb#L209-L228 * updata --- .../src/main/java/org/jackhuang/hmcl/launch/ExitWaiter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/launch/ExitWaiter.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/launch/ExitWaiter.java index 1c0bade68..71dba4885 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/launch/ExitWaiter.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/launch/ExitWaiter.java @@ -69,7 +69,10 @@ final class ExitWaiter implements Runnable { "A fatal exception has occurred. Program will exit.")) { EventBus.EVENT_BUS.fireEvent(new JVMLaunchFailedEvent(this, process)); exitType = ProcessListener.ExitType.JVM_ERROR; - } else if (exitCode != 0 || StringUtils.containsOne(errorLines, "Unable to launch")) { + } else if (exitCode != 0 || StringUtils.containsOne(errorLines, + "Someone is closing me!", + "Crash report saved to", "Could not save crash report to", "This crash report has been saved to:", + "Unable to launch", "An exception was thrown, the game will display an error screen and halt.")) { EventBus.EVENT_BUS.fireEvent(new ProcessExitedAbnormallyEvent(this, process)); if (exitCode == 137 && OperatingSystem.CURRENT_OS.isLinuxOrBSD()) {