[processing] handle same memory error in another algorithm

This commit is contained in:
Alexander Bruy 2014-03-31 19:17:34 +03:00
parent d3b4a8f5de
commit 1c27ee3198

View File

@ -65,7 +65,11 @@ for i in xrange(bandCount):
progress.setPercentage(int(current * total))
rasterBand = raster.GetRasterBand(i + 1)
data = rasterBand.ReadAsArray()
try:
data = rasterBand.ReadAsArray()
except:
raise GeoAlgorithmExecutionException(
'Error reading raster data. File might be too big.')
layer.ResetReading()
feature = layer.GetNextFeature()
col = []