Actually, Yii shows errors and exceptions on a blank page with the informations.
But I want tho change this, and show this information under my layout, show error/exception under the content of main page.
My idea was to inherit CErrorHandler and override render method to seem like the CController->render method. However, the last method requires so many proper functions (of the CController class) to work.
Using the guide approach, you can access $code, $message, etc. directly in your view. Otherwise, you would have to use $error['code'], $error['message'].