Skip to content
Browse files

check return value from the QgsRelief and notify user (fix #17452)

(cherry picked from commit 5d03f2b)
  • Loading branch information
alexbruy authored and nyalldawson committed Jun 19, 2020
1 parent 11c294d commit 046f3ae09e745dcac2398f42f6a696fede08e7ca
Showing with 15 additions and 1 deletion.
  1. +15 −1 python/plugins/processing/algs/qgis/
@@ -157,6 +157,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 046f3ae

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