aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/config.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-04-04 14:32:40 +0200
committerGitHub Enterprise <[email protected]>2024-04-04 14:32:40 +0200
commit12b7bf1c16f671c83840961c37a339141a7ffbb3 (patch)
tree3c503e6e1cd4d53b87c1baebcf9286ca8b72db06 /src/zenserver/config.cpp
parenthardening parsepackagemessage (#38) (diff)
downloadzen-12b7bf1c16f671c83840961c37a339141a7ffbb3.tar.xz
zen-12b7bf1c16f671c83840961c37a339141a7ffbb3.zip
improved assert (#37)
- Improvement: Add file and line to ASSERT exceptions - Improvement: Catch call stack when throwing assert exceptions and log/output call stack at important places to provide more context to caller
Diffstat (limited to 'src/zenserver/config.cpp')
-rw-r--r--src/zenserver/config.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenserver/config.cpp b/src/zenserver/config.cpp
index 00581d758..aa0eedb0e 100644
--- a/src/zenserver/config.cpp
+++ b/src/zenserver/config.cpp
@@ -128,7 +128,7 @@ ReadAllCentralManifests(const std::filesystem::path& SystemRoot)
ZEN_WARN("failed to load manifest '{}': {}", File, ToString(ValidateError));
}
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_WARN("failed to load manifest '{}': {}", File, Ex.what());
}
@@ -1004,7 +1004,7 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions)
{
Result = options.parse(argc, argv);
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
throw zen::OptionParseException(Ex.what());
}
@@ -1069,7 +1069,7 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions)
ValidateOptions(ServerOptions);
}
- catch (zen::OptionParseException& e)
+ catch (const zen::OptionParseException& e)
{
ZEN_CONSOLE_ERROR("Error parsing zenserver arguments: {}\n\n{}", e.what(), options.help());