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

Поиск
Список
Период
Сортировка
Искать

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

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
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 
Reviewed-by: Andrew Dunstan 
Reviewed-by: Corey Huinker 
Reviewed-by: Zsolt Parragi 
Reviewed-by: Nazir Bilal Yavuz 
Reviewed-by: Andres Freund 
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(-)

FAQ