eZ\Bundle\EzPublishCoreBundle\EventListener\ExceptionListener::getTranslatedMessage PHP Méthode

getTranslatedMessage() private méthode

Translates the exception message if it is translatable.
private getTranslatedMessage ( Exception $exception ) : string
$exception Exception
Résultat string
    private function getTranslatedMessage(Exception $exception)
    {
        $message = $exception->getMessage();
        if ($exception instanceof Translatable) {
            $message = $this->translator->trans($exception->getMessageTemplate(), $exception->getParameters(), 'repository_exceptions');
        }
        return $message;
    }