Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/184073
Change subject: MWException -> Exception
......................................................................
MWException -> Exception
Change-Id: I30313cf6a4043470025b965aac58b6f8cc7f8770
---
M MwEmbedModules/MediaWikiSupport/MediaWikiSupport.config.php
M MwEmbedModules/MwEmbedSupport/MwEmbedSupport.config.php
M MwEmbedResourceManager.php
3 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MwEmbedSupport
refs/changes/73/184073/1
diff --git a/MwEmbedModules/MediaWikiSupport/MediaWikiSupport.config.php
b/MwEmbedModules/MediaWikiSupport/MediaWikiSupport.config.php
index a83d7cf..a6e1664 100644
--- a/MwEmbedModules/MediaWikiSupport/MediaWikiSupport.config.php
+++ b/MwEmbedModules/MediaWikiSupport/MediaWikiSupport.config.php
@@ -18,4 +18,4 @@
'protect', 'block', 'unblock', 'move', 'edit', 'upload',
'emailuser',
'import', 'userrights' ),
-);
\ No newline at end of file
+);
diff --git a/MwEmbedModules/MwEmbedSupport/MwEmbedSupport.config.php
b/MwEmbedModules/MwEmbedSupport/MwEmbedSupport.config.php
index dd4dfc6..463a8a5 100644
--- a/MwEmbedModules/MwEmbedSupport/MwEmbedSupport.config.php
+++ b/MwEmbedModules/MwEmbedSupport/MwEmbedSupport.config.php
@@ -3,4 +3,4 @@
return array (
// Timeout of ajax requests in seconds
'AjaxRequestTimeout' => 30
- );
\ No newline at end of file
+ );
diff --git a/MwEmbedResourceManager.php b/MwEmbedResourceManager.php
index 0eb83aa..8db7b04 100644
--- a/MwEmbedResourceManager.php
+++ b/MwEmbedResourceManager.php
@@ -16,7 +16,7 @@
*
* Adds modules to ResourceLoader
* @param $mwEmbedResourcePath string
- * @throws MWException
+ * @throws Exception
*/
public static function register( $mwEmbedResourcePath ) {
global $IP, $wgExtensionMessagesFiles;
@@ -25,17 +25,17 @@
$modulePathParts = explode( '/', $mwEmbedResourcePath );
$moduleName = array_pop( $modulePathParts );
if ( !is_dir( $localResourcePath ) ) {
- throw new MWException( __METHOD__ . " not given
readable path: " . htmlspecialchars( $localResourcePath ) );
+ throw new Exception( __METHOD__ . " not given readable
path: " . htmlspecialchars( $localResourcePath ) );
}
if ( substr( $mwEmbedResourcePath, -1 ) == '/' ) {
- throw new MWException( __METHOD__ . " path has trailing
slash: " . htmlspecialchars( $localResourcePath ) );
+ throw new Exception( __METHOD__ . " path has trailing
slash: " . htmlspecialchars( $localResourcePath ) );
}
// Check that resource file is present:
$resourceListFilePath = $localResourcePath . '/' . $moduleName
. '.php';
if ( !is_file( $resourceListFilePath ) ) {
- throw new MWException( __METHOD__ . " mwEmbed Module is
missing resource list: " . htmlspecialchars( $resourceListFilePath ) );
+ throw new Exception( __METHOD__ . " mwEmbed Module is
missing resource list: " . htmlspecialchars( $resourceListFilePath ) );
}
// Get the mwEmbed module resource registration:
$resourceList = include $resourceListFilePath;
@@ -133,7 +133,7 @@
* This is copied and adapted of LocalisationCache::readJSONFile().
*
* @param string $fileName Name of file to read
- * @throws MWException if there is a syntax error in the JSON file
+ * @throws Exception if there is a syntax error in the JSON file
* @return array with a 'messages' key, or empty array if the file
doesn't exist
*/
public static function readJSONFileMessageKeys( $fileName ) {
@@ -156,7 +156,7 @@
if ( $data === null ) {
wfProfileOut( __METHOD__ );
- throw new MWException( __METHOD__ . ": Invalid JSON
file: $fileName" );
+ throw new Exception( __METHOD__ . ": Invalid JSON file:
$fileName" );
}
// Remove keys starting with '@', they're reserved for metadata
and non-message data
--
To view, visit https://gerrit.wikimedia.org/r/184073
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I30313cf6a4043470025b965aac58b6f8cc7f8770
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MwEmbedSupport
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits