cli: don't crash if something goes wrong, #72

This commit is contained in:
Bixilon 2022-03-14 18:52:57 +01:00
parent 1767f93dcc
commit fd48bd991b
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -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;