fix strange exception message
Merge pull request #5736