]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: Replace one self_destruct() with throw (#1871)
authorAmos Jeffries <yadij@users.noreply.github.com>
Tue, 6 Aug 2024 23:17:16 +0000 (23:17 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 6 Aug 2024 23:17:23 +0000 (23:17 +0000)
src/acl/Acl.cc

index 2d07d3fc9ac62968e32bec29b41f55a9e5f09829..d48b5c0813b19e0fe98cab8c8e90f6693a9f74ed 100644 (file)
@@ -61,11 +61,8 @@ Acl::Node *
 Make(TypeName typeName)
 {
     const auto pos = TheMakers().find(typeName);
-    if (pos == TheMakers().end()) {
-        debugs(28, DBG_CRITICAL, "FATAL: Invalid ACL type '" << typeName << "'");
-        self_destruct();
-        assert(false); // not reached
-    }
+    if (pos == TheMakers().end())
+        throw TextException(ToSBuf("invalid ACL type '", typeName, "'"), Here());
 
     auto *result = (pos->second)(pos->first);
     debugs(28, 4, typeName << '=' << result);