From 777c77baf96b69a2839118f8a27e2e2e70a28c5e Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Mon, 18 Nov 2024 18:27:06 -0800 Subject: [PATCH] confess() rather than die() in these locations. --- Supporters/lib/Supporters.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Supporters/lib/Supporters.pm b/Supporters/lib/Supporters.pm index 4cdf982..17a1252 100644 --- a/Supporters/lib/Supporters.pm +++ b/Supporters/lib/Supporters.pm @@ -1137,12 +1137,12 @@ sub getRequest($$;$) { my $requestTypeClause = ""; if (defined $requestTypeId) { $requestType = $self->_lookupRequestTypeById($requestTypeId); - die "getRequest: invalid requestTypeId, \"$requestTypeId\"" unless defined $requestType; + confess "getRequest: invalid requestTypeId, \"$requestTypeId\"" unless defined $requestType; $requestTypeClause = " AND rt.id = " . $self->dbh->quote($requestTypeId, 'SQL_INTEGER'); } elsif (defined $requestType) { $requestTypeClause = " AND rt.type = " . $self->dbh->quote($requestType); } else { - die "getRequest: undefined requestType" unless defined $requestType; + confess "getRequest: undefined requestType" unless defined $requestType; } my $req = $self->dbh()->selectall_hashref("SELECT r.id, r.request_type_id, r.request_configuration_id, r.date_requested, r.notes, rt.type " . "FROM request r, request_type rt WHERE r.request_type_id = rt.id AND " .