summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-01-02 15:05:04 +0100
committerMattes D <github@xoft.cz>2020-01-07 06:53:17 +0100
commit208313dba1687489962b159f31c25ea79322dd8d (patch)
treedd03ae7526f2c9b5e3631aed8a1baf1c7b27bb8a /src/main.cpp
parentRemoved old buildserver from README (diff)
downloadcuberite-208313dba1687489962b159f31c25ea79322dd8d.tar
cuberite-208313dba1687489962b159f31c25ea79322dd8d.tar.gz
cuberite-208313dba1687489962b159f31c25ea79322dd8d.tar.bz2
cuberite-208313dba1687489962b159f31c25ea79322dd8d.tar.lz
cuberite-208313dba1687489962b159f31c25ea79322dd8d.tar.xz
cuberite-208313dba1687489962b159f31c25ea79322dd8d.tar.zst
cuberite-208313dba1687489962b159f31c25ea79322dd8d.zip
Diffstat (limited to '')
-rw-r--r--src/main.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d75d7dc9a..4ff13c157 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -235,16 +235,19 @@ static void UniversalMain(std::unique_ptr<cSettingsRepositoryInterface> a_Overri
cRoot Root;
Root.Start(std::move(a_OverridesRepo));
}
- catch (fmt::FormatError & f)
+ catch (const fmt::FormatError & exc)
{
- FLOGERROR("Formatting exception: {0}", f.what());
+ cRoot::m_TerminateEventRaised = true;
+ FLOGERROR("Formatting exception: {0}", exc.what());
}
- catch (std::exception & e)
+ catch (const std::exception & exc)
{
- LOGERROR("Standard exception: %s", e.what());
+ cRoot::m_TerminateEventRaised = true;
+ LOGERROR("Standard exception: %s", exc.what());
}
catch (...)
{
+ cRoot::m_TerminateEventRaised = true;
LOGERROR("Unknown exception!");
}