Improve error messages.

Could we improve the error messages for these?