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 A92C01F462 for ; Fri, 24 May 2019 01:12:08 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] search: don't log all warnings on retry_reopen Date: Fri, 24 May 2019 01:12:08 +0000 Message-Id: <20190524011208.6253-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Some users (or bots :P) can trigger horrible queries which the caller can choose to either log or ignore. This prevents horrible queries from ExtMsg from logging confusing "ref: " messages when $@ is not a Perl reference. --- lib/PublicInbox/Search.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index d861cf4..c054a87 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -228,7 +228,9 @@ sub retry_reopen { warn "reopen try #$i on $@\n"; reopen($self); } else { - warn "ref: ", ref($@), "\n"; + # let caller decide how to spew, because ExtMsg queries + # get wonky and trigger: + # "something terrible happened at .../Xapian/Enquire.pm" die; } } -- EW