Clarify where and what Log Messages is

This commit is contained in:
Harrissou Sant-anna 2017-11-09 23:47:31 +01:00
parent 33d422b4de
commit c18bd1fa63

View File

@ -78,15 +78,15 @@ def handleAlgorithmResults(alg, context, feedback=None, showResults=True):
layer.loadNamedStyle(style)
details.project.addMapLayer(context.temporaryLayerStore().takeMapLayer(layer))
except Exception:
QgsMessageLog.logMessage("Error loading result layer:\n" + traceback.format_exc(), 'Processing', QgsMessageLog.CRITICAL)
QgsMessageLog.logMessage(QCoreApplication.translate('Postprocessing', "Error loading result layer:") + "\n" + traceback.format_exc(), 'Processing', QgsMessageLog.CRITICAL)
wrongLayers.append(str(l))
i += 1
QApplication.restoreOverrideCursor()
if wrongLayers:
msg = "The following layers were not correctly generated.<ul>"
msg += "".join(["<li>%s</li>" % lay for lay in wrongLayers]) + "</ul>"
msg += "You can check the log messages to find more information about the execution of the algorithm"
msg = QCoreApplication.translate('Postprocessing', "The following layers were not correctly generated.")
msg += "<ul>" + "".join(["<li>%s</li>" % lay for lay in wrongLayers]) + "</ul>"
msg += QCoreApplication.translate('Postprocessing', "You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.")
feedback.reportError(msg)
return len(wrongLayers) == 0