Simple error page for frontend users

I am getting a similar error in the frontend when something wrong happens.

CDbException

Table "details" does not have a column named "username".

C:\wamp\framework\db\schema\CDbCommandBuilder.php(568)

556 }

557 else

558 {

559 $conditions[]=$prefix.$column->rawName.’=’.self::PARAM_PREFIX.$i;

560 $values[self::PARAM_PREFIX.$i]=$value;

561 $i++;

562 }

563 }

564 else

565 $conditions[]=$prefix.$column->rawName.’ IS NULL’;

566 }

567 else

568 throw new CDbException(Yii::t(‘yii’,‘Table “{table}” does not have a column named “{column}”.’,

569 array(’{table}’=>$table->name,’{column}’=>$name)));

570 }

571 $criteria->params=array_merge($values,$criteria->params);

572 if(isset($conditions[0]))

573 {

574 if($criteria->condition!=’’)

575 $criteria->condition=implode(’ AND ‘,$conditions).’ AND (’.$criteria->condition.’)’;

576 else

577 $criteria->condition=implode(’ AND ',$conditions);

578 }

579 return $criteria;

580 }

Stack Trace…

I would like a simple error page instead of the above error for the frontend users, what changes will I have to do

If you disable the DEBUG mode then the error show is very simple - http://www.yiiframework.com/doc/guide/1.1/en/basics.entry