Improved InvalidNameError message #1182

Improved error message. @Kartones , this is the line you asked for, isn't it?