If you want to use your custom error action, you have to configure the errorAction
in the errorHandler
application component. You can do so in your main.php
. If your controller is CustomController
you'd configure:
'components' => array(
// ...
'errorHandler' => array(
'errorAction' => 'custom/error',
),
// ...