astropy/astropy — pull request #2443 by taldcroft (2014-05-06 01:14:48+00:00)
Title: Table column subsetting gives incorrect ValueError message

Here's a small testcase of what I mean:
```python
>>> from astropy.table import Table
>>> table = Table(dict(apple=[1,2,3], orange=[2,3,4]))
>>> table[['apple']]

array([(1,), (2,), (3,)],
dtype=[('apple', '>> table[['peach']]
Traceback (most recent call last):
File "", line 1, in
File "/Users/deil/Library/Python/2.7/lib/python/site-packages/astropy-0.4.dev8326-py2.7-macosx-10.9-x86_64.egg/astropy/table/table.py", line 856, in __getitem__
return self._new_from_slice(item)
File "/Users/deil/Library/Python/2.7/lib/python/site-packages/astropy-0.4.dev8326-py2.7-macosx-10.9-x86_64.egg/astropy/table/table.py", line 591, in _new_from_slice
self._update_table_from_cols(table, data, cols, names)
File "/Users/deil/Library/Python/2.7/lib/python/site-packages/astropy-0.4.dev8326-py2.7-macosx-10.9-x86_64.egg/astropy/table/table.py", line 604, in _update_table_from_cols
newcol = col.copy(data=data[name], copy_data=False)
ValueError: field named orange not found
```
The `ValueError` should complain that the field `'peach'` wasn't found instead of `'orange'`, no?