more descriptive error messages for class attributes

error messages now show the name of the invalid attribute