Improve error messages.
Merge pull request #65 from mtsgrd/query_errors

Improve error messages.