| @@ 78-82 (lines=5) @@ | ||
| 75 | } |
|
| 76 | } |
|
| 77 | } |
|
| 78 | } else if ($data instanceof Translatable && $this->translator) { |
|
| 79 | $errorDescription = $this->translator->trans($data->getMessageTemplate(), $data->getParameters(), 'repository_exceptions'); |
|
| 80 | } else { |
|
| 81 | $errorDescription = $data->getMessage(); |
|
| 82 | } |
|
| 83 | ||
| 84 | $generator->startValueElement('errorDescription', $errorDescription); |
|
| 85 | $generator->endValueElement('errorDescription'); |
|
| @@ 122-126 (lines=5) @@ | ||
| 119 | $generator->startValueElement('errorMessage', $this->httpStatusCodes[$statusCode]); |
|
| 120 | $generator->endValueElement('errorMessage'); |
|
| 121 | ||
| 122 | if ($data instanceof Translatable && $this->translator) { |
|
| 123 | $errorDescription = $this->translator->trans($data->getMessageTemplate(), $data->getParameters(), 'repository_exceptions'); |
|
| 124 | } else { |
|
| 125 | $errorDescription = $data->getMessage(); |
|
| 126 | } |
|
| 127 | $generator->startValueElement('errorDescription', $errorDescription); |
|
| 128 | $generator->endValueElement('errorDescription'); |
|
| 129 | ||