]> 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)
committerAmos Jeffries <yadij@users.noreply.github.com>
Wed, 7 Aug 2024 09:30:31 +0000 (21:30 +1200)
src/acl/Acl.cc

index c0704f57ce41583d53246f0712edaff27d8e4156..2d2b355ea045d9232a025edb02894cd91232deba 100644 (file)
@@ -53,11 +53,8 @@ ACL *
 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());
 
     ACL *result = (pos->second)(pos->first);
     debugs(28, 4, typeName << '=' << result);