Improved error message.
Merge pull request #1423 from cmfcmf/better-error-message

Improved error message.