Skip to content

Commit

Permalink
add field name when reporting an error in refactorfield algo
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry authored and nyalldawson committed Jan 13, 2020
1 parent 6b96794 commit 0a4f0e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/plugins/processing/algs/qgis/FieldsMapper.py
Expand Up @@ -108,9 +108,12 @@ def prepareAlgorithm(self, parameters, context, feedback):
expression.setAreaUnits(context.project().areaUnits())
if expression.hasParserError():
feedback.reportError(
self.tr(u'Parser error in expression "{}": {}')
.format(expression.expression(),
expression.parserErrorString()))
self.tr('Parser error for field "{}" with expression "{}": {}')
.format(
field_def['name'],
expression.expression(),
expression.parserErrorString()),
True)
return False
self.expressions.append(expression)
else:
Expand Down

0 comments on commit 0a4f0e5

Please sign in to comment.