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

Change subject: Moved ScopedCallback to /libs
......................................................................


Moved ScopedCallback to /libs

* The MWException is now a standard PHP exception type

Change-Id: I59e3b435cee32efe84c67766e29976b126384389
---
M includes/AutoLoader.php
R includes/libs/ScopedCallback.php
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Anomie: Looks good to me, approved
  Parent5446: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 58c8461..018e150 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -686,6 +686,7 @@
        'JSParser' => 'includes/libs/jsminplus.php',
        'JSToken' => 'includes/libs/jsminplus.php',
        'JSTokenizer' => 'includes/libs/jsminplus.php',
+       'ScopedCallback' => 'includes/libs/ScopedCallback.php',
        'ScopedPHPTimeout' => 'includes/libs/ScopedPHPTimeout.php',
        'XmlTypeCheck' => 'includes/libs/XmlTypeCheck.php',
 
@@ -1073,7 +1074,6 @@
        'RegexlikeReplacer' => 'includes/utils/StringUtils.php',
        'ReplacementArray' => 'includes/utils/StringUtils.php',
        'Replacer' => 'includes/utils/StringUtils.php',
-       'ScopedCallback' => 'includes/utils/ScopedCallback.php',
        'StringUtils' => 'includes/utils/StringUtils.php',
        'UIDGenerator' => 'includes/utils/UIDGenerator.php',
        'ZipDirectoryReader' => 'includes/utils/ZipDirectoryReader.php',
diff --git a/includes/utils/ScopedCallback.php 
b/includes/libs/ScopedCallback.php
similarity index 94%
rename from includes/utils/ScopedCallback.php
rename to includes/libs/ScopedCallback.php
index ef22e0a..631b651 100644
--- a/includes/utils/ScopedCallback.php
+++ b/includes/libs/ScopedCallback.php
@@ -31,11 +31,11 @@
 
        /**
         * @param callable $callback
-        * @throws MWException
+        * @throws Exception
         */
        public function __construct( $callback ) {
                if ( !is_callable( $callback ) ) {
-                       throw new MWException( "Provided callback is not 
valid." );
+                       throw new InvalidArgumentException( "Provided callback 
is not valid." );
                }
                $this->callback = $callback;
        }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59e3b435cee32efe84c67766e29976b126384389
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
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