Skip to content
Permalink
Browse files

[processing] stop algorithm execution if geometry/feature error occured

(fix #11986)
  • Loading branch information
alexbruy committed May 13, 2017
1 parent 512f5d5 commit 6feed195ca8fd4208fc426ad920960ed90650019
Showing with 7 additions and 8 deletions.
  1. +7 −8 python/plugins/processing/algs/qgis/Intersection.py
@@ -92,11 +92,10 @@ def processAlgorithm(self, progress):
int_sym = geom.symDifference(tmpGeom)
int_geom = QgsGeometry(int_com.difference(int_sym))
if int_geom.isGeosEmpty() or not int_geom.isGeosValid():
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('GEOS geoprocessing error: One or '
'more input features have invalid '
'geometry.'))
break
raise GeoAlgorithmExecutionException(
self.tr('GEOS geoprocessing error: One or '
'more input features have invalid '
'geometry.'))
try:
if int_geom.wkbType() in wkbTypeGroups[wkbTypeGroups[int_geom.wkbType()]]:
outFeat.setGeometry(int_geom)
@@ -106,8 +105,8 @@ def processAlgorithm(self, progress):
outFeat.setAttributes(attrs)
writer.addFeature(outFeat)
except:
ProcessingLog.addToLog(ProcessingLog.LOG_INFO,
self.tr('Feature geometry error: One or more output features ignored due to invalid geometry.'))
continue
raise GeoAlgorithmExecutionException(
self.tr('Feature geometry error: One or more '
'output features ignored due to invalid geometry.'))

del writer

0 comments on commit 6feed19

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