Skip to content
Permalink
Browse files

add field name when reporting an error in refactorfield algo

  • Loading branch information
Gustry authored and nyalldawson committed Jan 13, 2020
1 parent 6b96794 commit 0a4f0e51a62328dc9da75e8959b99b9f0d717965
Showing with 6 additions and 3 deletions.
  1. +6 −3 python/plugins/processing/algs/qgis/FieldsMapper.py
@@ -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:

0 comments on commit 0a4f0e5

Please sign in to comment.
You can’t perform that action at this time.