Dataset & IterableDataset attribute errors prints attribute (#69021)
Summary:
The message is the message from a standard attribute error.
Thought it would be informative when the error is thrown.
Alternatively in python 3.10, one can set the keyword arguments 'name' and 'obj',
reference: https://github.com/python/cpython/blob/3.10/Doc/library/exceptions.rst#concrete-exceptions
Fixes #{?}
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69021
Reviewed By: samdow
Differential Revision: D32730362
Pulled By: ejguan
fbshipit-source-id: 7132ba612fa6075aeffb9315ce651828e9a8e0bc