diff options
| author | 2026-06-19 13:00:58 +0100 | |
|---|---|---|
| committer | 2026-06-19 15:35:38 +0100 | |
| commit | a2981a9e35ab987a621d8ac8bb1b85e424939c48 (patch) | |
| tree | fad52f8e5df5c84fcf7129ad9a7269f53c5fe489 /src/modulemanager.cpp | |
| parent | Merge branch 'insp4' into master. (diff) | |
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.
Diffstat (limited to 'src/modulemanager.cpp')
| -rw-r--r-- | src/modulemanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<std::string, Service::List>& 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"); } } |
