Refactoring error message.