better warning messages (bug 978204)

![screenshot 2014-02-28 15 37 58](https://f.cloud.github.com/assets/74699/2299782/887072f8-a0d4-11e3-9b74-bfc295d76695.png)
 
This code looks to be untested, but its not clear to me how to test it. Can anyone throw me a clue stick?