From 434f5d652a0ef43a850262429c1bce9881bd7d5f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 22 Jun 2016 03:57:33 +0000 Subject: 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. --- lib/PublicInbox/View.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 } -- cgit v1.2.3-24-ge0c7