From a2981a9e35ab987a621d8ac8bb1b85e424939c48 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 19 Jun 2026 13:00:58 +0100 Subject: Rework error reporting and shutting down. - Clean up InspIRCd::Cleanup and document it better. - Bring back QuickExit for error reporting during shutdown. - Deduplicate logging of error messages to stdout and files. --- src/modulemanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modulemanager.cpp') diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 41862be34..ac9066f94 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -144,13 +144,13 @@ void ModuleManager::LoadCoreModules(std::map& servic if (!Load(name, true)) { fmt::println("[{}] {}", fmt::styled("*", fmt::emphasis::bold | fmt::fg(fmt::terminal_color::red)), LastError()); - ServerInstance->Exit(EXIT_FAILURE); + ServerInstance->Exit(EXIT_FAILURE, "A module failed to load"); } } } catch (const std::filesystem::filesystem_error& err) { - fmt::println("{} {}", fmt::styled("Error!", fmt::emphasis::bold | fmt::fg(fmt::terminal_color::red)), err.what()); - ServerInstance->Exit(EXIT_FAILURE); + ServerInstance->Exit(EXIT_FAILURE, FMT::format("Unable to read from the module directory: ", + err.what()), "MODULE"); } } -- cgit v1.3.1-10-gc9f91