Henry Lyne (henrylyne) wrote in changelog,
Henry Lyne
henrylyne
changelog

[livejournal] r14824: OPSLJ-171: Display an error message if t...

Committer: henrylyne
OPSLJ-171: Display an error message if there is a problem with the Entry.
This will allow the Subscriptions page to display even if some subs have problems.

U   trunk/cgi-bin/LJ/Event/JournalNewComment.pm
Modified: trunk/cgi-bin/LJ/Event/JournalNewComment.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/JournalNewComment.pm	2009-01-29 13:30:31 UTC (rev 14823)
+++ trunk/cgi-bin/LJ/Event/JournalNewComment.pm	2009-01-29 15:36:22 UTC (rev 14824)
@@ -353,7 +353,8 @@
     if ($arg2) {
         $comment = LJ::Comment->new($journal, jtalkid => $arg2);
         return "(Invalid comment)" unless $comment && $comment->valid;
-        $arg1 = $comment->entry->ditemid unless $arg1;
+        $arg1 = eval { $comment->entry->ditemid } unless $arg1;
+        return "(Invalid entry [$arg1:$arg2])" if $@;
     }
 
     my $entry = LJ::Entry->new($journal, ditemid => $arg1);

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments