【问题标题】:Where is my exception in my Web Profiler?我的 Web Profiler 中的异常在哪里?
【发布时间】:2015-02-15 22:35:11
【问题描述】:

我注意到在 prod 模式下运行我的应用程序会将 Web Profiler 的异常页面减少为“糟糕!发生错误”。

我的 config.yml:

framework:
    profiler:
        lifetime:    604800
        only_exceptions: true

相关的分析器文件包含异常和 prod.log 文件。

但是为什么那里缺少详细的异常?

【问题讨论】:

    标签: php symfony symfony-2.6


    【解决方案1】:

    这是因为Debug 组件在prod 环境中默认没有启用。 Debug 组件有自己的 ExceptionHandlerErrorHandler 将为您生成标准调试信息。

    【讨论】:

    • 那么最好的办法是替换 Prod 中的 Exception 和 ErrorHandler 吗?
    • 如果您有一个示例如何实现它,我将不胜感激。
    猜你喜欢
    • 2010-10-12
    • 2011-05-12
    • 2011-02-20
    • 2013-02-08
    • 2011-03-04
    • 1970-01-01
    • 1970-01-01
    • 2011-03-07
    • 2015-08-28
    相关资源
    最近更新 更多