]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/View.pm
view: allow thread generation to EOF on errors
[public-inbox.git] / lib / PublicInbox / View.pm
index 8d2e5424428a953ca74a1a1c157ead60b78f76c0..2b6061aeaaa0655cb621a25c2db686871ff58b5f 100644 (file)
@@ -33,8 +33,13 @@ sub msg_html {
                        $tip . multipart_text_as_html($mime, '') .
                                '</pre><hr />'
                } elsif ($nr == 2) {
-                       '<pre>' . html_footer($hdr, 1, $ctx) .
-                       '</pre>' . 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 {
+                               '<pre>' . html_footer($hdr, 1, $ctx) .
+                               '</pre>' . msg_reply($ctx, $hdr)
+                       };
                } else {
                        undef
                }