1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 17:16:38 +02:00

Show the invalid config value in the rejection message.

This commit is contained in:
Sadie Powell
2022-12-18 10:35:11 +00:00
parent 2f46739931
commit 3f867c1e11
+2 -2
View File
@@ -95,13 +95,13 @@ template<> bool Block::Get(const Anope::string &tag, const Anope::string &def) c
static void ValidateNotEmpty(const Anope::string &block, const Anope::string &name, const Anope::string &value)
{
if (value.empty())
throw ConfigException("The value for <" + block + ":" + name + "> cannot be empty!");
throw ConfigException("The value for <" + block + ":" + name + "> (" + value + ") cannot be empty!");
}
static void ValidateNoSpaces(const Anope::string &block, const Anope::string &name, const Anope::string &value)
{
if (value.find(' ') != Anope::string::npos)
throw ConfigException("The value for <" + block + ":" + name + "> may not contain spaces!");
throw ConfigException("The value for <" + block + ":" + name + "> (" + value + ") may not contain spaces!");
}
static void ValidateNotEmptyOrSpaces(const Anope::string &block, const Anope::string &name, const Anope::string &value)