From 58bcb92af35425daa6e809712b7c4aa8d7cbe011 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 8 Mar 2024 21:05:04 +0000 Subject: import: croak (instead of die) on write failures This allows accurate reporting of the error location and can be made to dump a Perl backtrace via PERL5OPT='-MCarp=verbose'. Noticed while tracking down fast-import failures. Link: https://public-inbox.org/meta/CAL_JsqK7P4gjLPyvzxNEcYmxT4j6Ah5f3Pz1RqDHxmysTg3aEg@mail.gmail.com/ --- lib/PublicInbox/Import.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 51ddfa7f..a951874b 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -85,7 +85,7 @@ sub gfi_start { $self->{io}; } -sub wfail () { die "write to fast-import failed: $!" } +sub wfail () { croak "write to fast-import failed: $!" } sub now_raw () { time . ' +0000' } -- cgit v1.2.3-24-ge0c7