From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id A65921F8C6 for ; Sun, 8 Aug 2021 20:07:47 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei_xsearch: improve Xapian open failure messages Date: Sun, 8 Aug 2021 20:07:47 +0000 Message-Id: <20210808200747.22256-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(-) 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");