use the attribute reader

This guarantees consistency when using name and makes sure the name the
user might see from introspection always matches the name seen in an
error.
slight naming clarification