Skip to content
Browse files

Merge pull request #36731 from alexbruy/relief-results

check return value from the QgsRelief and notify user about errors (fix #17452)
  • Loading branch information
alexbruy committed May 26, 2020
2 parents bcea438 + 5d03f2b commit 2a2fe1e095197d4b5feb6ba114077e7a9bf34933
Showing with 15 additions and 1 deletion.
  1. +15 −1 python/plugins/processing/algs/qgis/
@@ -156,6 +156,20 @@ def processAlgorithm(self, parameters, context, feedback):
if frequencyDistribution:
res = relief.processRaster(feedback)
if res == 1:
raise QgsProcessingException('Can not open input file.'))
elif res == 2:
raise QgsProcessingException('Can not get GDAL driver for output file.'))
elif res == 3:
raise QgsProcessingException('Can not create output file.'))
elif res == 4:
raise QgsProcessingException('Can not get input band.'))
elif res == 5:
raise QgsProcessingException('Can not create output bands.'))
elif res == 6:
raise QgsProcessingException('Output raster size is too small (at least 3 rows needed).'))
elif res == 7:

return {self.OUTPUT: outputFile, self.FREQUENCY_DISTRIBUTION: frequencyDistribution}

0 comments on commit 2a2fe1e

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