From 3706e9b10295dcae6d6fa5db93974af0f333cc0e Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 23 Jul 2014 17:47:10 -0700 Subject: [PATCH] Throw exception in importDump instead of dumping a random backtrace and erroring Change-Id: I2387168d96c3fd15299376c50521fd6f0710ce65 --- maintenance/importDump.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 ); -- 2.20.1