But I’m thinking - changing Yii::app()->errorHandler will affect anything that runs in this request right? I mean, if I have some method that runs at the end of the request, such as CApplication->onEndRequest(), it will run always with the modified error handler right?
I can use this solution but if I’m right above (with regard to other methods running on the same request) then this is not the cleanest solution. Maybe it doesn’t get any cleaner but that’s exactly the question…
I think that mere setting of Yii::app()->errorHandler->errorAction to a route in the specific controller is even sleeker since its less intrusive - no need to provide a complete error handler replacement component but rather only an action method.
I already implemented this as an extension which I’m uploading as I write this, since I wasn’t sure if Yii supports returning back to request processing after the method pointed by errorAction is being run.