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. | |
hasExceptionMessage (Exception $ex) | |
Whether this localizer can handle the given exception. | |
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\DispatchingExceptionLocalizer, and Wikibase\Repo\Localizer\GenericExceptionLocalizer.
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\ChangeOpApplyExceptionLocalizer, Wikibase\Repo\Localizer\ChangeOpDeserializationExceptionLocalizer, Wikibase\Repo\Localizer\ChangeOpValidationExceptionLocalizer, Wikibase\Repo\Localizer\DispatchingExceptionLocalizer, Wikibase\Repo\Localizer\GenericExceptionLocalizer, Wikibase\Repo\Localizer\MessageExceptionLocalizer, and Wikibase\Repo\Localizer\ParseExceptionLocalizer.