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;
}