Skip to content
Browse files

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

  • Loading branch information
alexbruy committed May 26, 2020
1 parent 3b0af96 commit 5d03f2bb9950deb6b5f66bf118feeced129fec9d
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 5d03f2b

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