How can we improve the informativity of error?

Hi, there )

I use CForm and get this fatal error

CForm::__toString() must not throw an exception

I got it once, debugged carefully and found than one was my fault ( i configured form element with non existing params)…

But in this case i can’t debug step by step, and for the first sight code seems ok.

So maybe someone can suggest a way to improve this error output to be more informative for developer ? what kind of exception, were did it come, stack trace info would be great :lol:

May be i think in a wrong way, so please direct me ;)

The user Vamp, offered a simple though informative method


echo $form;



it shows full exception info.

many thanks)))