MWException -> Exception
Change-Id: I18da1baeb70387b96e30811a049185a264dec26d
This commit is contained in:
parent
3b9c5b57a8
commit
d9b9b06032
|
@ -11,4 +11,4 @@ $specialPageAliases = array();
|
|||
/** English (English) */
|
||||
$specialPageAliases['en'] = array(
|
||||
'MathShowImage' => array( 'MathShowImage', 'MathShowImage' ) // No need to translate! The PageTitle does not appear.
|
||||
);
|
||||
);
|
||||
|
|
|
@ -212,13 +212,13 @@ class MathHooks {
|
|||
* LoadExtensionSchemaUpdates handler; set up math table on install/upgrade.
|
||||
*
|
||||
* @param $updater DatabaseUpdater
|
||||
* @throws MWException
|
||||
* @throws Exception
|
||||
* @return bool
|
||||
*/
|
||||
static function onLoadExtensionSchemaUpdates( $updater = null ) {
|
||||
global $wgMathValidModes;
|
||||
if ( is_null( $updater ) ) {
|
||||
throw new MWException( 'Math extension is only necessary in 1.18 or above' );
|
||||
throw new Exception( 'Math extension is only necessary in 1.18 or above' );
|
||||
}
|
||||
|
||||
$map = array( 'mysql', 'sqlite', 'postgres', 'oracle', 'mssql' );
|
||||
|
@ -237,7 +237,7 @@ class MathHooks {
|
|||
$updater->modifyExtensionField( 'mathlatexml', 'math_mathml', $sql );
|
||||
}
|
||||
} else {
|
||||
throw new MWException( "Math extension does not currently support $type database for LaTeXML." );
|
||||
throw new Exception( "Math extension does not currently support $type database for LaTeXML." );
|
||||
}
|
||||
}
|
||||
if ( in_array( MW_MATH_MATHML, $wgMathValidModes ) ) {
|
||||
|
@ -245,11 +245,11 @@ class MathHooks {
|
|||
$sql = dirname( __FILE__ ) . '/db/mathoid.' . $type . '.sql';
|
||||
$updater->addExtensionTable( 'mathoid', $sql );
|
||||
} else {
|
||||
throw new MWException( "Math extension does not currently support $type database for Mathoid." );
|
||||
throw new Exception( "Math extension does not currently support $type database for Mathoid." );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new MWException( "Math extension does not currently support $type database." );
|
||||
throw new Exception( "Math extension does not currently support $type database." );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class MathSource extends MathRenderer {
|
|||
}
|
||||
|
||||
protected function getMathTableName() {
|
||||
throw new MWException ( 'in math source mode no database caching should happen');
|
||||
throw new Exception ( 'in math source mode no database caching should happen');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -87,4 +87,4 @@ class MathCoverageTest extends MediaWikiTestCase {
|
|||
private function normalize( $input ) {
|
||||
return preg_replace( '#src="(.*?)/(([a-f]|\d)*).png"#', 'src="\2.png"', $input );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,4 +14,4 @@ class MathIdTest extends MediaWikiTestCase {
|
|||
$this->assertEquals( RANDOM_ID, $renderer->getId() );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,4 +49,4 @@ class MathLaTeXMLTest extends MediaWikiTestCase {
|
|||
, "Rendering of a+b in plain Text mode." .
|
||||
$renderer->getLastError() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -211,4 +211,4 @@ class MathMLTestStatus {
|
|||
return MathMathMLTest::$html;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -137,4 +137,4 @@ class MathRendererTest extends MediaWikiTestCase {
|
|||
// so readFromDatabase will be called again
|
||||
$this->assertEquals( $renderer->checkTex(), true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,4 +30,4 @@ class MathSourceTest extends MediaWikiTestCase {
|
|||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue