From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) 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.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8CF7B2019E for ; Tue, 9 May 2017 06:30:43 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/2] watchmaildir: show $@ in warning message Date: Tue, 9 May 2017 06:30:42 +0000 Message-Id: <20170509063042.10432-3-e@80x24.org> In-Reply-To: <20170509063042.10432-1-e@80x24.org> References: <20170509063042.10432-1-e@80x24.org> List-Id: It should be helpful to know what error happened. --- lib/PublicInbox/WatchMaildir.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 985f919..c436742 100644 --- a/lib/PublicInbox/WatchMaildir.pm +++ b/lib/PublicInbox/WatchMaildir.pm @@ -111,7 +111,10 @@ sub _remove_spam { $im->remove($scrubbed); } }; - warn "error removing spam at $path from $ibx->{name}\n" if $@; + if ($@) { + warn "error removing spam at: ", $path, + " from ", $ibx->{name}, ': ', $@, "\n"; + } }) } -- EW