Better message for missing fields

Happens in projections, when trying to use a field that does not exist.
master
Salvo 'LtWorf' Tomaselli 2016-03-31 21:28:23 +07:00
parent 72318bb0e8
commit 7661d21da2
1 changed files with 4 additions and 1 deletions

@ -531,7 +531,10 @@ class Header(tuple):
def getAttributesId(self, param):
'''Returns a list with numeric index corresponding to field's name'''
try:
return [self.index(i) for i in param]
except ValueError as e:
raise Exception('One of the fields is not in the relation: %s' % ','.join(param))
# Backwards compatibility
relation = Relation