Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Localizer\ExceptionLocalizer Interface Reference

Interface for services that provide localized messages for various types of Exceptions. More...

+ Inheritance diagram for Wikibase\Repo\Localizer\ExceptionLocalizer:

Public Member Functions

 getExceptionMessage (Exception $ex)
 Returns a Message object containing a localized message representing the exception, in a form appropriate for display to the user. More...
 
 hasExceptionMessage (Exception $ex)
 Whether this localizer can handle the given exception. More...
 

Detailed Description

Interface for services that provide localized messages for various types of Exceptions.

Author
Daniel Kinzler

Member Function Documentation

◆ getExceptionMessage()

Wikibase\Repo\Localizer\ExceptionLocalizer::getExceptionMessage ( Exception  $ex)

Returns a Message object containing a localized message representing the exception, in a form appropriate for display to the user.

The localized message may or may not contain the text returned by $ex->getMessage().

Parameters
Exception$ex
Exceptions
InvalidArgumentExceptionIf localization of the given exception is not supported.
Returns
Message

Implemented in Wikibase\Repo\Localizer\GenericExceptionLocalizer, and Wikibase\Repo\Localizer\DispatchingExceptionLocalizer.

◆ hasExceptionMessage()

Wikibase\Repo\Localizer\ExceptionLocalizer::hasExceptionMessage ( Exception  $ex)

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