B
B
BonBon Slick2018-03-01 10:06:35
Exceptions
BonBon Slick, 2018-03-01 10:06:35

How to avoid an exception on an exception?

When I issue a validation, I use the Symphony localization package for custom localization of the message.

throw new FormValidationException(
                $this->translator->trans( 'validation.exception',[], 'validation'),
                $violations,
                $request->request->all()
            );

And it turns out that this is an action in an action. In addition to the fact that I already peredayut to all levels above, 1,2,3,4 the validation exception, now I also need to catch the exception because of an attempt to localize the error.
Or is it worth it to give up on this, and issue messages of exceptions exclusively in English?
Now, only one desire, to throw everything away, because I dug myself in expresheny

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question