about summary refs log tree commit homepage
path: root/lib/PublicInbox/Search.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r--lib/PublicInbox/Search.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index fbcff2c3..59a5a3b0 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -9,6 +9,7 @@ use parent qw(Exporter);
 our @EXPORT_OK = qw(retry_reopen int_val get_pct xap_terms);
 use List::Util qw(max);
 use POSIX qw(strftime);
+use Carp ();
 
 # values for searching, changing the numeric value breaks
 # compatibility with old indices (so don't change them it)
@@ -405,16 +406,16 @@ sub retry_reopen {
                 # Exception: The revision being read has been discarded -
                 # you should call Xapian::Database::reopen()
                 if (ref($@) =~ /\bDatabaseModifiedError\b/) {
-                        warn "reopen try #$i on $@\n";
+                        warn "# reopen try #$i on $@\n";
                         reopen($self);
                 } else {
                         # let caller decide how to spew, because ExtMsg queries
                         # get wonky and trigger:
                         # "something terrible happened at .../Xapian/Enquire.pm"
-                        die;
+                        Carp::croak($@);
                 }
         }
-        die "Too many Xapian database modifications in progress\n";
+        Carp::croak("Too many Xapian database modifications in progress\n");
 }
 
 sub _do_enquire {