diff options
Diffstat (limited to 'src/zenserver/main.cpp')
| -rw-r--r-- | src/zenserver/main.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/zenserver/main.cpp b/src/zenserver/main.cpp index 023abc8a3..c27d4eb04 100644 --- a/src/zenserver/main.cpp +++ b/src/zenserver/main.cpp @@ -5,6 +5,7 @@ #include <zencore/compactbinarybuilder.h> #include <zencore/compactbinaryvalidation.h> #include <zencore/config.h> +#include <zencore/except.h> #include <zencore/filesystem.h> #include <zencore/fmtutils.h> #include <zencore/logging.h> @@ -92,10 +93,9 @@ ZenEntryPoint::Run() std::string SentryDatabasePath = (m_ServerOptions.DataDir / ".sentry-native").string(); std::string SentryAttachmentPath = m_ServerOptions.AbsLogFile.string(); - Sentry.Initialize(SentryDatabasePath, SentryAttachmentPath, m_ServerOptions.SentryAllowPII); + Sentry.Initialize(SentryDatabasePath, SentryAttachmentPath, m_ServerOptions.SentryAllowPII, m_ServerOptions.CommandLine); } #endif - try { // Mutual exclusion and synchronization @@ -179,6 +179,8 @@ ZenEntryPoint::Run() InitializeServerLogging(m_ServerOptions); + ZEN_INFO("Command line: {}", m_ServerOptions.CommandLine); + #if ZEN_USE_SENTRY Sentry.LogStartupInformation(); #endif @@ -437,6 +439,12 @@ main(int argc, char* argv[]) return App.Run(); #endif } + catch (const OptionParseException& ParseEx) + { + // The parsing error already outputs all the details so no need to output the command line here + fprintf(stderr, "ERROR: %s\n", ParseEx.what()); + return 1; + } catch (const AssertException& AssertEx) { fprintf(stderr, "ERROR: Caught assert exception in main: '%s'", AssertEx.FullDescription().c_str()); |