JaquelineBrandao / yii

Automatically exported from code.google.com/p/yii
0 stars 0 forks source link

Change to Exception message in CDbCommand::queryInternal #919

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Proposal to include the actual SQL statement in the Exception message to
save having to trace it through. Helps no end with debugging :-)

The exception becomes:
throw new CDbException(Yii::t('yii',"CDbCommand failed to execute the SQL
statement: {statement}\nError: {error}",
array('{statement}'=>$this->getText(), '{error}'=>$e->getMessage())));

Original issue reported on code.google.com by ch...@thebeastlybeasts.co.uk on 11 Feb 2010 at 1:48

GoogleCodeExporter commented 9 years ago
We don't include the SQL in exception because it is possible the exception 
message is
displayed to end users. If you turn on logging, you should find the SQL in the 
logged
messages.

Original comment by qiang.xue on 18 Feb 2010 at 9:39