Skip to content

Commit

Permalink
Improve debug output of processing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 14, 2016
1 parent fb3fcfa commit 9852d6d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions python/plugins/processing/core/GeoAlgorithmExecutionException.py
Expand Up @@ -35,11 +35,14 @@ def __init__(self, msg, stack=None, cause=None):
self.cause = cause self.cause = cause


def __str__(self): def __str__(self):
msg = self.msg.split('\n') msg = self.msg.split(u'\n')
msg = ' | ' + '\n | '.join(msg) msg = u' | ' + u'\n | '.join(msg)


stack = '\n'.join(self.stack) try:
stack = stack.split('\n') stack = u'\n'.join(self.stack)
stack = ' ' + '\n '.join(stack) except TypeError:
stack = repr(self.stack)
stack = stack.split(u'\n')
stack = u' ' + u'\n '.join(stack)


return '\n\n Message:\n{}\n\n Stack:\n\n{}'.format(msg, stack) return u'\n\n Message:\n{}\n\n Stack:\n\n{}'.format(msg, stack)

0 comments on commit 9852d6d

Please sign in to comment.