]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
import: croak (instead of die) on write failures
authorEric Wong <e@80x24.org>
Fri, 8 Mar 2024 21:05:04 +0000 (21:05 +0000)
committerEric Wong <e@80x24.org>
Sun, 10 Mar 2024 21:36:00 +0000 (21:36 +0000)
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

index 51ddfa7f24c5d58514d6ccf88e7e0832615be976..a951874b339c18f2509a298b1a2956e2ed95796b 100644 (file)
@@ -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' }