开发者

How do I run shell with custom Error handler?

开发者 https://www.devze.com 2023-01-28 16:37 出处:网络
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.

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

精彩评论

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