MWException -> Exception

Change-Id: I18da1baeb70387b96e30811a049185a264dec26d
This commit is contained in:
Ori Livneh 2015-01-09 17:55:54 -08:00
parent 3b9c5b57a8
commit d9b9b06032
9 changed files with 13 additions and 13 deletions

View File

@ -11,4 +11,4 @@ $specialPageAliases = array();
/** English (English) */ /** English (English) */
$specialPageAliases['en'] = array( $specialPageAliases['en'] = array(
'MathShowImage' => array( 'MathShowImage', 'MathShowImage' ) // No need to translate! The PageTitle does not appear. 'MathShowImage' => array( 'MathShowImage', 'MathShowImage' ) // No need to translate! The PageTitle does not appear.
); );

View File

@ -212,13 +212,13 @@ class MathHooks {
* LoadExtensionSchemaUpdates handler; set up math table on install/upgrade. * LoadExtensionSchemaUpdates handler; set up math table on install/upgrade.
* *
* @param $updater DatabaseUpdater * @param $updater DatabaseUpdater
* @throws MWException * @throws Exception
* @return bool * @return bool
*/ */
static function onLoadExtensionSchemaUpdates( $updater = null ) { static function onLoadExtensionSchemaUpdates( $updater = null ) {
global $wgMathValidModes; global $wgMathValidModes;
if ( is_null( $updater ) ) { 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' ); $map = array( 'mysql', 'sqlite', 'postgres', 'oracle', 'mssql' );
@ -237,7 +237,7 @@ class MathHooks {
$updater->modifyExtensionField( 'mathlatexml', 'math_mathml', $sql ); $updater->modifyExtensionField( 'mathlatexml', 'math_mathml', $sql );
} }
} else { } 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 ) ) { if ( in_array( MW_MATH_MATHML, $wgMathValidModes ) ) {
@ -245,11 +245,11 @@ class MathHooks {
$sql = dirname( __FILE__ ) . '/db/mathoid.' . $type . '.sql'; $sql = dirname( __FILE__ ) . '/db/mathoid.' . $type . '.sql';
$updater->addExtensionTable( 'mathoid', $sql ); $updater->addExtensionTable( 'mathoid', $sql );
} else { } 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 { } 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; return true;
} }

View File

@ -56,7 +56,7 @@ class MathSource extends MathRenderer {
} }
protected function getMathTableName() { 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');
} }
/** /**

View File

@ -87,4 +87,4 @@ class MathCoverageTest extends MediaWikiTestCase {
private function normalize( $input ) { private function normalize( $input ) {
return preg_replace( '#src="(.*?)/(([a-f]|\d)*).png"#', 'src="\2.png"', $input ); return preg_replace( '#src="(.*?)/(([a-f]|\d)*).png"#', 'src="\2.png"', $input );
} }
} }

View File

@ -14,4 +14,4 @@ class MathIdTest extends MediaWikiTestCase {
$this->assertEquals( RANDOM_ID, $renderer->getId() ); $this->assertEquals( RANDOM_ID, $renderer->getId() );
} }
} }

View File

@ -49,4 +49,4 @@ class MathLaTeXMLTest extends MediaWikiTestCase {
, "Rendering of a+b in plain Text mode." . , "Rendering of a+b in plain Text mode." .
$renderer->getLastError() ); $renderer->getLastError() );
} }
} }

View File

@ -211,4 +211,4 @@ class MathMLTestStatus {
return MathMathMLTest::$html; return MathMathMLTest::$html;
} }
} }

View File

@ -137,4 +137,4 @@ class MathRendererTest extends MediaWikiTestCase {
// so readFromDatabase will be called again // so readFromDatabase will be called again
$this->assertEquals( $renderer->checkTex(), true ); $this->assertEquals( $renderer->checkTex(), true );
} }
} }

View File

@ -30,4 +30,4 @@ class MathSourceTest extends MediaWikiTestCase {
); );
} }
} }