From: Eric Wong Date: Wed, 22 Jun 2016 03:57:33 +0000 (+0000) Subject: view: allow thread generation to EOF on errors X-Git-Tag: v1.0.0~376 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=434f5d652a0ef43a850262429c1bce9881bd7d5f;p=public-inbox.git view: allow thread generation to EOF on errors We want to ensure the actual message gets shown, and less important info does not destroy things. --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 8d2e5424..2b6061ae 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -33,8 +33,13 @@ sub msg_html { $tip . multipart_text_as_html($mime, '') . '
' } elsif ($nr == 2) { - '
' . html_footer($hdr, 1, $ctx) .
-			'
' . msg_reply($ctx, $hdr); + # fake an EOF if generating the footer fails; + # we want to at least show the message if something + # here crashes: + eval { + '
' . html_footer($hdr, 1, $ctx) .
+				'
' . msg_reply($ctx, $hdr) + }; } else { undef }