From: Chad Horohoe Date: Thu, 24 Jul 2014 00:47:10 +0000 (-0700) Subject: Throw exception in importDump instead of dumping a random backtrace and erroring X-Git-Tag: 1.31.0-rc.0~14643^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24ze_article%22%29%20.%20%22?a=commitdiff_plain;h=3706e9b10295dcae6d6fa5db93974af0f333cc0e;p=lhc%2Fweb%2Fwiklou.git Throw exception in importDump instead of dumping a random backtrace and erroring Change-Id: I2387168d96c3fd15299376c50521fd6f0710ce65 --- diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 1fedefbb8c..1f75bccfc5 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -141,8 +141,7 @@ TEXT; } elseif ( $obj instanceof WikiRevision ) { $ns = $obj->title->getNamespace(); } else { - echo wfBacktrace(); - $this->error( "Cannot get namespace of object in " . __METHOD__, true ); + throw new MWException( "Cannot get namespace of object in " . __METHOD__ ); } return is_array( $this->nsFilter ) && !in_array( $ns, $this->nsFilter );