A more informative error message.

Closes #7336