Call CHttpException from component (child from CUrlManager) does not work errorHandler->errorAction=>‘site/error’,
instead of my custom error page, i see just CHttpException…
Call CHttpException from component (child from CUrlManager) does not work errorHandler->errorAction=>‘site/error’,
instead of my custom error page, i see just CHttpException…
It depends on the time when the exception is thrown. The errorAction defaults to null. If you throw an exception from the constructor of CUrlManager the errorAction of the error handler will not have been set yet an thus it will display the exception itself. Both CUrlManager and CErrorHandler are core components and will be initalized before assigning the values from the configuration file.
You should take a look at: CApplication::__construct()