Skip to content

Commit f3cd3ee

Browse files
committedNov 8, 2015
[processing] add log error message when error occurs in postprocessing task
1 parent b5794b2 commit f3cd3ee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎python/plugins/processing/gui/Postprocessing.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
***************************************************************************
1818
"""
1919

20+
2021
__author__ = 'Victor Olaya'
2122
__date__ = 'August 2012'
2223
__copyright__ = '(C) 2012, Victor Olaya'
@@ -26,12 +27,14 @@
2627
__revision__ = '$Format:%H$'
2728

2829
import os
30+
import traceback
2931
from PyQt4.QtGui import QApplication
3032
from PyQt4.QtCore import QCoreApplication
3133
from qgis.core import QgsMapLayerRegistry
3234

3335
from processing.core.ProcessingConfig import ProcessingConfig
3436
from processing.core.ProcessingResults import ProcessingResults
37+
from processing.core.ProcessingLog import ProcessingLog
3538

3639
from processing.gui.ResultsDialog import ResultsDialog
3740
from processing.gui.RenderingStyles import RenderingStyles
@@ -71,7 +74,9 @@ def handleAlgorithmResults(alg, progress=None, showResults=True):
7174
dataobjects.load(out.value, name, alg.crs,
7275
RenderingStyles.getStyle(alg.commandLineName(),
7376
out.name))
74-
except Exception as e:
77+
except Exception:
78+
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
79+
"Error loading result layer:\n" + traceback.format_exc())
7580
wrongLayers.append(out.description)
7681
elif isinstance(out, OutputHTML):
7782
ProcessingResults.addResult(out.description, out.value)

0 commit comments

Comments
 (0)
Please sign in to comment.