开发者

How do I run shell with custom Error handler?

I have custom AppError class which starts with

App::import('Core', 'Error');

When I try to run any shell script I run into "Fatal error: cannot redeclare class ErrorHandler in .开发者_如何学Go..\cake\libs\error". It seems the ErrorHandler for console is loaded...


Why don't you simply extend the ErrorHandler class if it is already loaded?

<?php
class AppError extends ErrorHandler {
}   
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜