pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: perl tap: Use croak instead of die in our helper modules
Date: Thu, 02 Apr 2026 12:25:39 +0000
Message-ID: <E1w8H7D-002bgY-04@gemulon.postgresql.org> (raw)

perl tap: Use croak instead of die in our helper modules

Replace die with croak throughout Cluster.pm and Utils.pm (except in
INIT blocks and signal handlers, where die is correct) so that error
messages report the test script's line number rather than the helper
module's.

Add @CARP_NOT in Utils.pm listing PostgreSQL::Test::Cluster, so that
when a Utils function is called through a Cluster.pm wrapper, croak
skips both packages and reports the actual test-script caller.

Author: Jelte Fennema-Nio <postgres@jeltef.nl>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/DFYFWM053WHS.10K8ZPJ605UFK@jeltef.nl

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b8da9869b850246ea047038fb974830269b83bcc

Modified Files
--------------
src/test/perl/PostgreSQL/Test/Cluster.pm | 108 +++++++++++++++----------------
src/test/perl/PostgreSQL/Test/Utils.pm   |  30 +++++----
2 files changed, 71 insertions(+), 67 deletions(-)



Message-ID: <E1w8H7D-002bgY-04@gemulon.postgresql.org>
Permalink:  ../E1w8H7D-002bgY-04@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w8H7D-002bgY-04@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andrew@dunslane.net, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: perl tap: Use croak instead of die in our helper modules
  In-Reply-To: <E1w8H7D-002bgY-04@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox