Skip to content
Browse files

Fix Python exception in Random Points in Polygon alg

Fixes #18103
  • Loading branch information
nyalldawson committed Feb 14, 2018
1 parent 792c19b commit 8154a85f296e35cf670e33269d0698707232733b
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/processing/algs/qgis/
@@ -113,11 +113,11 @@ def processAlgorithm(self, parameters, context, feedback):

expression = QgsExpression(self.parameterAsString(parameters, self.EXPRESSION, context))
if expression.hasParserError():
raise ProcessingException(expression.parserErrorString())
raise QgsProcessingException(expression.parserErrorString())

expressionContext = self.createExpressionContext(parameters, context)
if not expression.prepare(expressionContext):
raise ProcessingException(
raise QgsProcessingException('Evaluation error: {0}').format(expression.evalErrorString()))

fields = QgsFields()

0 comments on commit 8154a85

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