From: Eric Wong Date: Tue, 9 May 2017 06:30:42 +0000 (+0000) Subject: watchmaildir: show $@ in warning message X-Git-Tag: v1.0.0~68 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=bb588e4ae5d21ebaaacef18d8360590a97421d9b watchmaildir: show $@ in warning message It should be helpful to know what error happened. --- diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 985f9192..c436742c 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"; + } }) }