Merge "Add method parameter type documentation"
[lhc/web/wiklou.git] / includes / api / ApiBase.php
index 8f5185a..ce6ecda 100644 (file)
@@ -1404,6 +1404,7 @@ abstract class ApiBase extends ContextSource {
                'uploaddisabled' => array( 'code' => 'uploaddisabled', 'info' => 'Uploads are not enabled. Make sure $wgEnableUploads is set to true in LocalSettings.php and the PHP ini setting file_uploads is true' ),
                'copyuploaddisabled' => array( 'code' => 'copyuploaddisabled', 'info' => 'Uploads by URL is not enabled. Make sure $wgAllowCopyUploads is set to true in LocalSettings.php.' ),
                'copyuploadbaddomain' => array( 'code' => 'copyuploadbaddomain', 'info' => 'Uploads by URL are not allowed from this domain.' ),
+               'copyuploadbadurl' => array( 'code' => 'copyuploadbadurl', 'info' => 'Upload not allowed from this URL.' ),
 
                'filename-tooshort' => array( 'code' => 'filename-tooshort', 'info' => 'The filename is too short' ),
                'filename-toolong' => array( 'code' => 'filename-toolong', 'info' => 'The filename is too long' ),
@@ -1502,7 +1503,7 @@ abstract class ApiBase extends ContextSource {
         * @param string $message Error message
         */
        protected static function dieDebug( $method, $message ) {
-               wfDebugDieBacktrace( "Internal error in $method: $message" );
+               throw new MWException( "Internal error in $method: $message" );
        }
 
        /**