DB warnings

I just spent a day and a half dealing with a cryptic problem in my app. It could have been fixed in minutes if I had been able to see warnings generated in the DB server?

Is there a way to configure yii\db\Connection so that warnings returned by the DB server result in exceptions?

For want of any better ideas I put this in my.cnf


sql_mode = strict_trans_tables

I don’t know for sure if it is any use.



It will show everything. I’m using it during development.