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 {
}
?>
精彩评论