views:

32

answers:

1

hello !

I just want to know how does error controller work for different module ,say its admin and default,in zend framework... because its working fine in default module but not working in admin module ...

is there any condition which I have to use? and how ?

A: 

If you are using a custom error handler (if not, you probably will be soon), you need to register it with the front controller:

$front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new Zend_Controller_Plugin_ErrorHandler(array(
    'module'     => 'error',
    'controller' => 'error',
    'action'     => 'error'
)));

This means you have a module, a controller and action all called 'error'. If you don't have a custom error controller yet, google it or have a read through http://www.thedeveloperday.com/custom-profiler-for-live-environments/

Ashley
I have custom errror controller ..and its properly working with default modulesee if I type in URL "/application/error" its show appropriate actionbut if i type "/application/admin/error" ...fatal error says ... Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller class ("Admin_ErrorController")' in C:\xampp\htdocs\asiandirectors\library\Zend\Controller\Dispatcher\Standard.php...blah blah
Richa