PHP
PHP

Reputation: 1709

How does error controller work in zend

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 ?

Upvotes: 2

Views: 4252

Answers (1)

Ashley
Ashley

Reputation: 5957

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/

Upvotes: 6

Related Questions