Skip to content
Permalink
Browse files
Merge pull request #4041 from borysiasty/release-2_18
[Processing] Yet another fix for error message encoding errors. Fixes #16102
  • Loading branch information
borysiasty committed Jan 23, 2017
2 parents 1746b32 + 6071b40 commit 685e4a2be023f416c854048f155daf2dff528c9e
Showing with 6 additions and 1 deletion.
  1. +6 −1 python/plugins/processing/core/GeoAlgorithm.py
@@ -215,8 +215,13 @@ 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 UnicodeDecodeError:
# Try with the 'replace' mode (requires e.message instead of e!)
message = unicode(e.message, 'utf-8', 'replace')
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 685e4a2

Please sign in to comment.