From 52cc8a418307ae7a551d23e6bd2d367b544e7bf9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 7 Jan 2022 17:12:42 +0000 Subject: Refactor CoreException and ModuleException. --- src/modules/m_hostchange.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_hostchange.cpp') diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index d1f3426b2..5016ed5c4 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -156,7 +156,7 @@ private: // Ensure that we have the parameter. const std::string mask = tag->getString("mask"); if (mask.empty()) - throw ModuleException(" is a mandatory field, at " + tag->source.str()); + throw ModuleException(this, " is a mandatory field, at " + tag->source.str()); // Determine what type of host rule this is. const std::string action = tag->getString("action"); @@ -175,7 +175,7 @@ private: // Ensure that we have the parameter. const std::string value = tag->getString("value"); if (value.empty()) - throw ModuleException(" is a mandatory field when using the 'set' action, at " + tag->source.str()); + throw ModuleException(this, " is a mandatory field when using the 'set' action, at " + tag->source.str()); // The hostname is in the format . rules.emplace_back(tag, mask, value); @@ -183,7 +183,7 @@ private: } else { - throw ModuleException(action + " is an invalid type, at " + tag->source.str()); + throw ModuleException(this, action + " is an invalid type, at " + tag->source.str()); } } -- cgit v1.3.1-10-gc9f91