From fd48bd991bf4458baae8c38073cdc3d7a4d8ad98 Mon Sep 17 00:00:00 2001 From: Bixilon Date: Mon, 14 Mar 2022 18:52:57 +0100 Subject: [PATCH] cli: don't crash if something goes wrong, #72 --- src/main/java/de/bixilon/minosoft/terminal/CLI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/bixilon/minosoft/terminal/CLI.java b/src/main/java/de/bixilon/minosoft/terminal/CLI.java index 4618b33fd..d266859aa 100644 --- a/src/main/java/de/bixilon/minosoft/terminal/CLI.java +++ b/src/main/java/de/bixilon/minosoft/terminal/CLI.java @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020 Moritz Zwerger + * Copyright (C) 2020-2022 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -98,7 +98,7 @@ public class CLI { } catch (UserInterruptException e) { ShutdownManager.INSTANCE.shutdown(e.getMessage(), ShutdownReasons.REQUESTED_BY_USER); return; - } catch (Exception other) { + } catch (Throwable other) { other.printStackTrace(); Log.log(LogMessageType.GENERAL, LogLevels.INFO, () -> "Failed to read line. Stopping CLI!"); return;