'errorHandler' => array(
'class' => 'ErrorHandler',
'errorAction' => 'page/find',
),
http://shot.qip.ru/008pAk-4IA4wMhU6/
我有漂亮的错误页面的标准错误处理。但对于开发环境,我需要在其下面使用标准的堆栈跟踪。
Examlpe:http://shot.qip.ru/008pAk-4IA4wMhU7/
如果我评论'errorAction'我只能看到标准的堆栈跟踪,在其他情况下我无法显示这个堆栈跟踪。
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class' => 'CWebLogRoute',
'categories' => 'application, exception.*',
'levels'=>'error, warning, trace, profile, info',
'showInFireBug' => true,
'enabled' => YII_DEBUG,
),
array(
'class'=>'ext.yii-debug-toolbar.YiiDebugToolbarRoute',
'ipFilters'=>array('127.0.0.1','192.168.0.100'),
),
array(
'class'=>'CProfileLogRoute',
'report'=>'summary',
// Shows the execution time of each labeled with a code block.
// The value of "report" can also be specified as a "callstack".
),
),
),
答案 0 :(得分:1)
默认情况下,错误处理程序使用两种类型的视图 生产命名为error.php; 开发命名为exception.php;
根据您的路由和错误处理程序代码。我看到你定义了一个自定义错误操作 您必须使用以下链接中指定的格式将自定义错误视图放在以下任一文件夹中,并使用标准错误操作。
themes/ThemeName/views/system: when a theme is active.
protected/views/system
有关详细说明,请参阅此文档 参考:http://www.yiiframework.com/doc/api/1.1/CErrorHandler
答案 1 :(得分:1)
尝试此扩展http://www.yiiframework.com/extension/yii-debug-toolbar/
Yii调试工具栏是一组可配置的面板,可显示有关当前请求/响应的各种调试信息,单击此按钮可显示有关面板内容的更多详细信息。 它是一个移植到PHP着名的Django调试工具栏。