我在论坛里搜索,我什么也没找到。
我对 Symfony2 上的异常处理程序有疑问。当我尝试访问它不存在的路由时,Symfony 检索一个空白页面(在 prod 环境中)。日志写了一条消息: Route not exists for.... 但未显示自定义模板。
在 config.yml 中:
twig:
exception_controller: twig.controller.exception:showAction
模板位于:
app/Resources/TwigBundle/views/Exception/error500.html.twig
app/Resources/TwigBundle/views/Exception/error404.html.twig
我做错了什么?