MediaWiki master
MediaWiki\Exception\LocalizedException Class Reference

Basic localized exception. More...

Inherits Exception, and MediaWiki\Exception\ILocalizedException.

Inherited by IncompatibleDiffTypesException.

Collaboration diagram for MediaWiki\Exception\LocalizedException:

Public Member Functions

 __construct ( $messageSpec, $code=0, ?Throwable $previous=null)
 
 getMessageObject ()
 Return a Message object for this exception.
 

Protected Attributes

string array MessageSpecifier $messageSpec
 

Detailed Description

Basic localized exception.

Stability: newable
Stability: stable
to extend
Since
1.29
Note
Don't use this in a situation where MessageCache is not functional.

Definition at line 38 of file LocalizedException.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Exception\LocalizedException::__construct ( $messageSpec,
$code = 0,
?Throwable $previous = null )
Stability: stable
to call
Parameters
string | array | MessageSpecifier$messageSpecSee Message::newFromSpecifier
int$code
Throwable | null$previousThe previous exception used for the exception chaining.

Definition at line 49 of file LocalizedException.php.

References MediaWiki\Exception\LocalizedException\$messageSpec, and MediaWiki\Exception\LocalizedException\getMessageObject().

Member Function Documentation

◆ getMessageObject()

MediaWiki\Exception\LocalizedException::getMessageObject ( )

Member Data Documentation

◆ $messageSpec

string array MessageSpecifier MediaWiki\Exception\LocalizedException::$messageSpec
protected

The documentation for this class was generated from the following file: