Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/91658
Change subject: Throw JS exception on badfile rather than PHP exception.
......................................................................
Throw JS exception on badfile rather than PHP exception.
Bug: 56076
Change-Id: I69fd96b8c58ee8c0913f7a24d6174bcfc33ba574
---
M includes/modules/MFResourceLoaderModule.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/58/91658/1
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: newchange
Gerrit-Change-Id: I69fd96b8c58ee8c0913f7a24d6174bcfc33ba574
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits