get more meaningful errors

I'm using this, just in case you find it interesting.