jenkins-bot has submitted this change and it was merged.

Change subject: Catch and log exceptions with RC formatting
......................................................................


Catch and log exceptions with RC formatting

Change-Id: I4df38be71e4158812b7d7c0213170f9ab08065af
---
M Hooks.php
1 file changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Matthias Mullie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Hooks.php b/Hooks.php
index f1599a1..f18e965 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1,6 +1,7 @@
 <?php
 
 use Flow\Container;
+use Flow\Exception\FlowException;
 use Flow\Model\UUID;
 
 class FlowHooks {
@@ -101,8 +102,13 @@
                        return true;
                }
 
-               $line = Container::get( 'recentchanges.formatter' )->format( 
$changesList, $rc );
-
+               try {
+                       $line = Container::get( 'recentchanges.formatter' 
)->format( $changesList, $rc );
+               } catch ( FlowException $e ) {
+                       wfWarn( __METHOD__ . ': Exception formatting rc ' . 
$rc->getAttribute( 'rc_id' ) . ' ' . $e );
+                       \MWExceptionHandler::logException( $e );
+                       return false;
+               }
                if ( $line === false ) {
                        return false;
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/113156
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4df38be71e4158812b7d7c0213170f9ab08065af
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>
Gerrit-Reviewer: Matthias Mullie <mmul...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to