*
* @ingroup Database
*/
-class LBFactoryMulti extends LBFactory {
+class LBFactoryMulti extends LBFactoryMW {
/** @var array A map of database names to section names */
private $sectionsByDB;
/**
* @param array $conf
- * @throws MWException
+ * @throws InvalidArgumentException
*/
public function __construct( array $conf ) {
parent::__construct( $conf );
foreach ( $required as $key ) {
if ( !isset( $conf[$key] ) ) {
- throw new MWException( __CLASS__ . ": $key is required in configuration" );
+ throw new InvalidArgumentException( __CLASS__ . ": $key is required in configuration" );
}
$this->$key = $conf[$key];
}
/**
* @param string $cluster
* @param bool|string $wiki
- * @throws MWException
+ * @throws InvalidArgumentException
* @return LoadBalancer
*/
protected function newExternalLB( $cluster, $wiki = false ) {
if ( !isset( $this->externalLoads[$cluster] ) ) {
- throw new MWException( __METHOD__ . ": Unknown cluster \"$cluster\"" );
+ throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" );
}
$template = $this->serverTemplate;
if ( isset( $this->externalTemplateOverrides ) ) {