Skip to content

Commit

Permalink
Maintenance: Replace one self_destruct() with throw (squid-cache#1871)
Browse files Browse the repository at this point in the history
  • Loading branch information
yadij authored and kinkie committed Oct 12, 2024
1 parent 9a95193 commit 2b84ddb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/acl/Acl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2b84ddb

Please sign in to comment.