diff options
author | Sadie Powell <sadie@witchery.services> | 2025-04-27 14:16:10 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-04-27 14:16:10 +0100 |
commit | 046fa5c848f19a0d91245bb94466fa70c40c34bb (patch) | |
tree | 8e8f3fafa0fa9908227a3e473e798c595b46e745 /src/config.cpp | |
parent | 551f3504c8b6978cac12de2cb4ca2a93e2621737 (diff) |
Show the reason why a config file failed to open.
Diffstat (limited to 'src/config.cpp')
-rw-r--r-- | src/config.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config.cpp b/src/config.cpp index 348bd9dd8..24387d2bb 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -776,7 +776,10 @@ void Conf::LoadConf(File &file) return; if (!file.Open()) - throw ConfigException("File " + file.GetPath() + " could not be opened."); + { + throw ConfigException(Anope::printf("File %s could not be opened: %s.", + file.GetPath().c_str(), strerror(errno))); + } Anope::string itemname, wordbuffer; std::stack<Block *> block_stack; |