Throw exception in importDump instead of dumping a random backtrace and erroring
authorChad Horohoe <chadh@wikimedia.org>
Thu, 24 Jul 2014 00:47:10 +0000 (17:47 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Mon, 28 Jul 2014 22:25:57 +0000 (15:25 -0700)
Change-Id: I2387168d96c3fd15299376c50521fd6f0710ce65

maintenance/importDump.php

index 1fedefb..1f75bcc 100644 (file)
@@ -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 );