]> Sergey Matveev's repositories - public-inbox.git/commitdiff
git: warn on ->cat_async callback errors
authorEric Wong <e@yhbt.net>
Wed, 6 May 2020 00:40:45 +0000 (00:40 +0000)
committerEric Wong <e@yhbt.net>
Wed, 6 May 2020 00:40:45 +0000 (00:40 +0000)
This will help us track down bugs in our own code when
it comes to missing error checking.

lib/PublicInbox/Git.pm

index 057135efd0dccbf7ac69f7059f46518e72e951d3..8426cc7d6a705488e8dded3bd0691fd412e0a372 100644 (file)
@@ -147,6 +147,7 @@ sub _cat_async_step ($$) {
        my ($oid_hex, $type, $size) = ($1, $2, $3 + 0);
        my $bref = read_cat_in_full($self, $size);
        eval { $cb->($bref, $oid_hex, $type, $size, $arg) };
+       warn "E: $oid_hex $@\n" if $@;
 }
 
 sub cat_async_wait ($) {