Add Information To Cexception And Cemaillogroute

I’ve got a number of errors in my CEmailLogRoute. That’s fine but I’d like to have more specified information.

  • For example with 403 access denied errors I’d like to know which Yii::app()->user->id initiated this.

  • Possibly I want also to add the roles which the user has.

Is it possible to add information to either CEmailLogRoute or more specific to a CException or to CHttpException.403?

I’ve got an answer on Stackoverflow.

Vote up if useful for further readers.