Skip to content

Commit 9224f58

Browse files
committedJan 23, 2017
[Processing] Follow up 1ede526
1 parent 1ede526 commit 9224f58

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
 

‎python/plugins/processing/core/GeoAlgorithm.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,9 @@ def execute(self, progress=None, model=None):
215215
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, lines)
216216
try:
217217
message = unicode(e)
218-
except Exception:
219-
# Encoding the error message failed. Try with the 'replace' mode.
220-
try:
221-
message = unicode(e.message, 'utf-8', 'replace')
222-
except Exception:
223-
message = self.tr('Unknown error')
218+
except UnicodeDecodeError:
219+
# Try with the 'replace' mode (requires e.message instead of e!)
220+
message = unicode(e.message, 'utf-8', 'replace')
224221
raise GeoAlgorithmExecutionException(
225222
message + self.tr(' \nSee log for more details'), lines, e)
226223

0 commit comments

Comments
 (0)
Please sign in to comment.