MediaWiki fundraising/REL1_35
LocalizedException Class Reference

Basic localized exception. More...

Inheritance diagram for LocalizedException:
Collaboration diagram for LocalizedException:

Public Member Functions

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

Protected Attributes

string array MessageSpecifier $messageSpec
 

Detailed Description

Basic localized exception.

@newable Stable to extend

Since
1.29
Note
Don't use this in a situation where MessageCache is not functional.

Definition at line 30 of file LocalizedException.php.

Constructor & Destructor Documentation

◆ __construct()

LocalizedException::__construct ( $messageSpec,
$code = 0,
Throwable $previous = null )

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 41 of file LocalizedException.php.

References $messageSpec, and getMessageObject().

Member Function Documentation

◆ getMessageObject()

LocalizedException::getMessageObject ( )

Return a Message object for this exception.

Returns
Message

Implements ILocalizedException.

Definition at line 53 of file LocalizedException.php.

References Message\newFromSpecifier().

Referenced by __construct().

Member Data Documentation

◆ $messageSpec

string array MessageSpecifier LocalizedException::$messageSpec
protected

Definition at line 32 of file LocalizedException.php.

Referenced by __construct().


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