Better message for missing fields
Happens in projections, when trying to use a field that does not exist.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user