Better error messages
Merge pull request #2043 from ef4/error-messages

Better error messages