From 0bbfa2553c63fafca3a502a887c575bd8d401a0a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 8 Aug 2021 20:07:47 +0000 Subject: lei_xsearch: improve Xapian open failure messages Displaying $! can help users diagnose resource limit problems such as EMFILE/ENFILE/ENOMEM. $@ is currently useful for XS Search::Xapian and perhaps future versions of the Xapian.pm SWIG bindings. --- lib/PublicInbox/LeiXSearch.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiXSearch.pm') diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index 3414e87d..393f25bf 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -32,7 +32,7 @@ sub attach_external { my ($self, $ibxish) = @_; # ibxish = ExtSearch or Inbox my $desc = $ibxish->{inboxdir} // $ibxish->{topdir}; my $srch = $ibxish->search or - return warn("$desc not indexed for Xapian\n"); + return warn("$desc not indexed for Xapian ($@ $!)\n"); my @shards = $srch->xdb_shards_flat or return warn("$desc has no Xapian shards\n"); -- cgit v1.2.3-24-ge0c7