From 046fa5c848f19a0d91245bb94466fa70c40c34bb Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 27 Apr 2025 14:16:10 +0100 Subject: [PATCH] Show the reason why a config file failed to open. --- src/config.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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_stack;