Updated enum error message improvement to apply to all objects, and to also show variable names for these errors.