Skip to content
Permalink
Browse files

[processing] log errors in hook scripts

  • Loading branch information
volaya committed May 19, 2016
1 parent 518f7dc commit a19741b29713546169afa314909a6ff0d68eed1a
Showing with 6 additions and 4 deletions.
  1. +6 −4 python/plugins/processing/core/GeoAlgorithm.py
@@ -68,9 +68,9 @@ def __init__(self):
# appear in the toolbox or modeler
self.showInToolbox = True
self.showInModeler = True
#if true, will show only loaded layers in parameters dialog.
#Also, if True, the algorithm does not run on the modeler
#or batch ptocessing interface
# if true, will show only loaded layers in parameters dialog.
# Also, if True, the algorithm does not run on the modeler
# or batch ptocessing interface
self.allowOnlyOpenedLayers = False

# False if it should not be run a a batch process
@@ -255,7 +255,9 @@ def runHookScript(self, filename, progress):
for line in lines:
script += line
exec(script, ns)
except:
except Exception, e:
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING,
"Error in hook script: " + str(e))
# A wrong script should not cause problems, so we swallow
# all exceptions
pass

0 comments on commit a19741b

Please sign in to comment.