Change Ui Of Error

I want to change the User interface of error in the yii application. How can change the errors views like 404,400 and database related error to a specific page or render to a page based on the error in yii? I comment the index.php DEBUG code and copy the code from framework/views to views/system folder but its not working. How can we perform these using controllers?

did you read that: ?

i used that operations in my application. But the views not changed. How can i solve this?