MediaWiki master
LocalizedException Class Reference

Basic localized exception. More...

Inherits Exception, and ILocalizedException.

Inherited by IncompatibleDiffTypesException.

Collaboration diagram for 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 32 of file LocalizedException.php.

Constructor & Destructor Documentation

◆ __construct()

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

Referenced by __construct(), DifferenceEngine\getDiffBody(), and DifferenceEngine\getDiffBodyForRole().

Member Data Documentation

◆ $messageSpec

string array MessageSpecifier LocalizedException::$messageSpec
protected

Definition at line 34 of file LocalizedException.php.

Referenced by __construct().


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