catch fatal errors

subj, is it possible via frameworks functions or only via register_shutdown_function ?

I think you have to use register_shutdown_function.

It seems assigning Yii::app()->onError = … is not enough.

I do something like this to catch all errors:




...

Yii::app()->onError = array('onYiiError');

register_shutdown_function('onCriticalError');

....



so, Yii::app()->onError = array(‘onYiiError’);

will similar like register errorHandler/errorAction or not?




...

'errorHandler'=>array(			

        'class' => 'ErrorHandler',

        'errorAction' => 'site/error'

...



thx

also, could, please, anybody provide link to base shutdown function, may exist some extension for Yii…

thx

another strange thing for me is errorAction of errorHandler.

for example if I call nonexisting action I`ve got error msg "{class} and its behaviors do not have a method or closure named "{name}" " by thowing CException from CComponent and normal redirect to site/error.

But if I try to throw Exception manually, there are not redirect to site/error… why?

please, clear it

thanks