From 95ae3c4a45435a8208a8f10b27c78329b5ad3e85 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 19 Oct 2021 09:33:38 +0000 Subject: lei: use die for external and query handling This allows "lei up" to continue processing unrelated externals if on output fails. --- lib/PublicInbox/LeiXSearch.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/LeiXSearch.pm') diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index 8ab84b15..119070a2 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -142,11 +142,11 @@ sub wait_startq ($) { delete $lei->{opt}->{verbose}; delete $lei->{-progress}; } else { - $lei->fail("$$ WTF `$do_augment_done'"); + die "BUG: do_augment_done=`$do_augment_done'"; } return; } - return $lei->fail("$$ wait_startq: $!") unless $!{EINTR}; + die "wait_startq: $!" unless $!{EINTR}; } } @@ -473,7 +473,8 @@ sub do_post_augment { $lei->fail("$err"); } if (!$err && delete $lei->{early_mua}) { # non-augment case - $lei->start_mua; + eval { $lei->start_mua }; + $lei->fail($@) if $@; } close(delete $lei->{au_done}); # triggers wait_startq in lei_xsearch } -- cgit v1.2.3-24-ge0c7