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

Change subject: Hygiene: Throw JS exception on bad template file rather than 
PHP exception.
......................................................................


Hygiene: Throw JS exception on bad template file rather than PHP exception.

Bug: 56076

Change-Id: I69fd96b8c58ee8c0913f7a24d6174bcfc33ba574
---
M includes/modules/MFResourceLoaderModule.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/modules/MFResourceLoaderModule.php 
b/includes/modules/MFResourceLoaderModule.php
index d33e227..849502c 100644
--- a/includes/modules/MFResourceLoaderModule.php
+++ b/includes/modules/MFResourceLoaderModule.php
@@ -81,8 +81,8 @@
                                $content = file_get_contents( $localPath );
                                $js .= Xml::encodeJsCall( 'mw.template.add', 
array( $templateName, $content ) );
                        } else {
-                               $msg = __METHOD__.": template file not found: 
\"$localPath\"";
-                               throw new MWException( $msg );
+                               $msg = __METHOD__.": template not found: 
\"$templateName\"";
+                               $js .= Xml::encodeJsCall( 'throw', array( $msg 
) );
                        }
                }
                return $js;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69fd96b8c58ee8c0913f7a24d6174bcfc33ba574
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to