Skip to content

Commit

Permalink
Nicer debugging from boundary alg
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 12, 2017
1 parent 5c844a5 commit a87cc53
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/plugins/processing/algs/qgis/Boundary.py
Expand Up @@ -93,10 +93,10 @@ def processAlgorithm(self, parameters, context, feedback):
if input_geometry:
output_geometry = QgsGeometry(input_geometry.geometry().boundary())
if not output_geometry:
raise GeoAlgorithmExecutionException(
self.tr('Error calculating boundary'))

output_feature.setGeometry(output_geometry)
feedback.reportError(self.tr('No boundary for feature {} (possibly a closed linestring?)').format(input_feature.id()))
output_feature.clearGeometry()
else:
output_feature.setGeometry(output_geometry)

sink.addFeature(output_feature, QgsFeatureSink.FastInsert)
feedback.setProgress(int(current * total))
Expand Down

0 comments on commit a87cc53

Please sign in to comment.