Error capturing in module

I have an "errorAction = site/error" in my app config.

But for administration i have a module. So i want to display errors from module in a corresponding controller (and view) that belongs to admin module.

Now i get redirected to site/error on all errors not matter where they happens.

Please help with capturing errors from module to another controller.


In your module init() method:

Yii::app()->errorHandler->errorAction = 'MyModule/controller/action';

is what you need?

andy_s, thank you. you are the guru :)

Thanks this was helping me.

But I got another problem here.

How to disable the error handler for not capturing error like unable to load images like

"Unable to resolve the request "images/sample.jpg". Currently my errorhandler saving to database while rendering error page.

Thank you very much.