Wikibase
MediaWiki Wikibase extension
|
Interface for services that provide localized messages for various types of Exceptions. More...
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... | |
Interface for services that provide localized messages for various types of Exceptions.
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().
Exception | $ex |
InvalidArgumentException | If localization of the given exception is not supported. |
Implemented in Wikibase\Repo\Localizer\GenericExceptionLocalizer, and Wikibase\Repo\Localizer\DispatchingExceptionLocalizer.
Wikibase\Repo\Localizer\ExceptionLocalizer::hasExceptionMessage | ( | Exception | $ex | ) |
Whether this localizer can handle the given exception.
This is intended for use by a dispatcher to determine which localizer can handle a given exception.
Exception | $ex |
Implemented in Wikibase\Repo\Localizer\ParseExceptionLocalizer, Wikibase\Repo\Localizer\MessageExceptionLocalizer, Wikibase\Repo\Localizer\GenericExceptionLocalizer, Wikibase\Repo\Localizer\DispatchingExceptionLocalizer, Wikibase\Repo\Localizer\ChangeOpValidationExceptionLocalizer, Wikibase\Repo\Localizer\ChangeOpDeserializationExceptionLocalizer, and Wikibase\Repo\Localizer\ChangeOpApplyExceptionLocalizer.