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

Change subject: Remove wfWarn and catch MWException in 
ParserAfterParseHookHandler
......................................................................


Remove wfWarn and catch MWException in ParserAfterParseHookHandler

I am nearly certain this does not happen in production,
never seen in the logs.

If there happens to be some problem, then the real stack
trace is obscured in the logs and we would only get a warning
notification.

Change-Id: Ifac31a0cf1cec4b6386d465797b2eea0235560be
---
M client/includes/Hooks/ParserAfterParseHookHandler.php
1 file changed, 6 insertions(+), 10 deletions(-)

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



diff --git a/client/includes/Hooks/ParserAfterParseHookHandler.php 
b/client/includes/Hooks/ParserAfterParseHookHandler.php
index f1a889f..f3516f7 100644
--- a/client/includes/Hooks/ParserAfterParseHookHandler.php
+++ b/client/includes/Hooks/ParserAfterParseHookHandler.php
@@ -140,18 +140,14 @@
                $parserOutput = $parser->getOutput();
                $useRepoLinks = $this->langLinkHandler->useRepoLinks( $title, 
$parserOutput );
 
-               try {
-                       if ( $useRepoLinks ) {
-                               // add links
-                               $this->langLinkHandler->addLinksFromRepository( 
$title, $parserOutput );
-                       }
-
-                       $this->langLinkHandler->updateItemIdProperty( $title, 
$parserOutput );
-                       $this->langLinkHandler->updateOtherProjectsLinksData( 
$title, $parserOutput );
-               } catch ( Exception $e ) {
-                       wfWarn( 'Failed to add repo links: ' . $e->getMessage() 
);
+               if ( $useRepoLinks ) {
+                       // add links
+                       $this->langLinkHandler->addLinksFromRepository( $title, 
$parserOutput );
                }
 
+               $this->langLinkHandler->updateItemIdProperty( $title, 
$parserOutput );
+               $this->langLinkHandler->updateOtherProjectsLinksData( $title, 
$parserOutput );
+
                if ( $useRepoLinks || $this->alwaysSort ) {
                        $interwikiLinks = $parserOutput->getLanguageLinks();
                        $sortedLinks = $this->interwikiSorter->sortLinks( 
$interwikiLinks );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifac31a0cf1cec4b6386d465797b2eea0235560be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to