Skip to content

Commit

Permalink
[processing] add log error message when error occurs in postprocessin…
Browse files Browse the repository at this point in the history
…g task
  • Loading branch information
volaya committed Nov 8, 2015
1 parent b5794b2 commit f3cd3ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/plugins/processing/gui/Postprocessing.py
Expand Up @@ -17,6 +17,7 @@
***************************************************************************
"""


__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
Expand All @@ -26,12 +27,14 @@
__revision__ = '$Format:%H$'

import os
import traceback
from PyQt4.QtGui import QApplication
from PyQt4.QtCore import QCoreApplication
from qgis.core import QgsMapLayerRegistry

from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.ProcessingResults import ProcessingResults
from processing.core.ProcessingLog import ProcessingLog

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

0 comments on commit f3cd3ee

Please sign in to comment.