Skip to content

Commit

Permalink
[processing] handle same memory error in another algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Mar 31, 2014
1 parent d3b4a8f commit 1c27ee3
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -65,7 +65,11 @@
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 = []
Expand Down

0 comments on commit 1c27ee3

Please sign in to comment.