Skip to content

Commit 04cc1cb

Browse files
committed
report georaster init error to logs, fix domlysz#352
1 parent 065071f commit 04cc1cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

operators/io_import_georaster.py

+5
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ def execute(self, context):
256256
try:
257257
rast = bpyGeoRaster(filePath)
258258
except IOError as e:
259+
log.error("Unable to open raster", exc_info=True)
259260
self.report({'ERROR'}, "Unable to open raster, check logs for more infos")
260261
return {'CANCELLED'}
261262
#Get or set georef dx, dy
@@ -288,6 +289,7 @@ def execute(self, context):
288289
try:
289290
rast = bpyGeoRaster(filePath)
290291
except IOError as e:
292+
log.error("Unable to open raster", exc_info=True)
291293
self.report({'ERROR'}, "Unable to open raster, check logs for more infos")
292294
return {'CANCELLED'}
293295
#Check pixel size and rotation
@@ -342,6 +344,7 @@ def execute(self, context):
342344
try:
343345
rast = bpyGeoRaster(filePath, subBoxGeo=subBox)
344346
except IOError as e:
347+
log.error("Unable to open raster", exc_info=True)
345348
self.report({'ERROR'}, "Unable to open raster, check logs for more infos")
346349
return {'CANCELLED'}
347350
except OverlapError:
@@ -383,6 +386,7 @@ def execute(self, context):
383386
try:
384387
grid = bpyGeoRaster(filePath, subBoxGeo=subBox, clip=self.clip, fillNodata=self.fillNodata, useGDAL=HAS_GDAL, raw=True)
385388
except IOError as e:
389+
log.error("Unable to open raster", exc_info=True)
386390
self.report({'ERROR'}, "Unable to open raster, check logs for more infos")
387391
return {'CANCELLED'}
388392
except OverlapError:
@@ -440,6 +444,7 @@ def execute(self, context):
440444
try:
441445
grid = GeoRaster(filePath, subBoxGeo=subBox, useGDAL=HAS_GDAL)
442446
except IOError as e:
447+
log.error("Unable to open raster", exc_info=True)
443448
self.report({'ERROR'}, "Unable to open raster, check logs for more infos")
444449
return {'CANCELLED'}
445450
except OverlapError:

0 commit comments

Comments
 (0)