diff options
author | Eric Wong <e@80x24.org> | 2014-08-28 02:15:08 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-08-28 02:47:11 +0000 |
commit | e3884bc14d2540192ec065a8b082fc9d0f68f343 (patch) | |
tree | 0d40d06b62eb2ef5907891683a7519febfe6b671 | |
parent | c5d457c20c4ac43b877221b23ad6b2dbdf3b6d75 (diff) | |
download | public-inbox-e3884bc14d2540192ec065a8b082fc9d0f68f343.tar.gz |
Sometimes we get spam and need to delete messages, we must prevent errors on missing messages from propagating.
-rw-r--r-- | lib/PublicInbox/Feed.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 1eaba6c2..646c85c9 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -291,8 +291,11 @@ sub dump_msg { sub do_cat_mail { my ($git, $path) = @_; - my $str = $git->cat_file("HEAD:$path"); - Email::MIME->new($str); + my $mime = eval { + my $str = $git->cat_file("HEAD:$path"); + Email::MIME->new($str); + }; + $@ ? undef : $mime; } 1; |