V
V
Vladimir Mogilev2018-12-14 17:00:25
symfony
Vladimir Mogilev, 2018-12-14 17:00:25

Why does a 404 pop up when trying to return a Response?

Good day to those who read this.
A small application is created on the knee. It uses symfony/httpKernel::Kernel() and the symfony/framework-bundle itself. The entry point is filp/whoops and shoots errors (in dev). A kind of symphony in miniature.
At the time of writing the controller, I ran into a problem: if a variable that is used there is not passed to the view (twig), then the standard browser stub 404 flies out to me, and if you specify the strict_variables=>false parameter for the twig, then everything kicks and starts up fine. The same applies to uncreated extensions.
In this case, the Response object is not returned, but simply throws an exception. And so actually and a question Where undertakes 404 and why it does not catch whoops?

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