Skip to content
Permalink
Browse files
[Processing] Yet another fix for error message encoding errors. Fixes #…
  • Loading branch information
borysiasty committed Jan 23, 2017
1 parent 1746b32 commit 32f65d3cc0cd665dfed3b35a9ee538d0653b9a4b
Showing with 9 additions and 1 deletion.
  1. +9 −1 python/plugins/processing/core/GeoAlgorithm.py
@@ -215,8 +215,16 @@ def execute(self, progress=SilentProgress(), model=None):
lines = [self.tr('Uncaught error while executing algorithm')]
lines.append(traceback.format_exc())
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, lines)
try:
message = unicode(e)
except Exception:
# Encoding the error message failed. Try with the 'replace' mode.
try:
message = unicode(e.message, 'utf-8', 'replace')
except Exception:
message = self.tr('Unknown error')
raise GeoAlgorithmExecutionException(
unicode(e.message, errors='replace') + self.tr('\nSee log for more details'), lines, e)
message + self.tr(' \nSee log for more details'), lines, e)

def _checkParameterValuesBeforeExecuting(self):
for param in self.parameters:

0 comments on commit 32f65d3

Please sign in to comment.