Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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.
 
 hasExceptionMessage (Exception $ex)
 Whether this localizer can handle the given exception.
 

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().

Exceptions
InvalidArgumentExceptionIf localization of the given exception is not supported.

Implemented in Wikibase\Repo\Localizer\ChangeOpValidationExceptionLocalizer, Wikibase\Repo\Localizer\DispatchingExceptionLocalizer, Wikibase\Repo\Localizer\GenericExceptionLocalizer, Wikibase\Repo\Localizer\MessageExceptionLocalizer, and Wikibase\Repo\Localizer\ParseExceptionLocalizer.

◆ hasExceptionMessage()

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

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