Enhance error messages.
Merge commit 'e407ee3a28c431cb1e487d5264d9446e75709885' into HEAD