diff options
Diffstat (limited to 'src/zenserver/main.cpp')
| -rw-r--r-- | src/zenserver/main.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/zenserver/main.cpp b/src/zenserver/main.cpp index 7a6d2dd22..6b31dc82e 100644 --- a/src/zenserver/main.cpp +++ b/src/zenserver/main.cpp @@ -247,7 +247,12 @@ ZenEntryPoint::Run() Server.Run(); } - catch (std::exception& e) + catch (const AssertException& AssertEx) + { + ZEN_CRITICAL("Caught assert exception in main for process {}: {}", zen::GetCurrentProcessId(), AssertEx.FullDescription()); + RequestApplicationExit(1); + } + catch (const std::exception& e) { ZEN_CRITICAL("Caught exception in main for process {}: {}", zen::GetCurrentProcessId(), e.what()); RequestApplicationExit(1); @@ -407,7 +412,12 @@ main(int argc, char* argv[]) return App.Run(); #endif } - catch (std::exception& Ex) + catch (const AssertException& AssertEx) + { + fprintf(stderr, "ERROR: Caught assert exception in main: '%s'", AssertEx.FullDescription().c_str()); + return 1; + } + catch (const std::exception& Ex) { fprintf(stderr, "ERROR: Caught exception in main: '%s'", Ex.what()); |