Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #121 from gluetool/print-exception-name-if-empty
Browse files Browse the repository at this point in the history
gluetool/tool: print exception name if message empty
  • Loading branch information
thrix committed Jun 28, 2021
2 parents 568d111 + 9e51dfa commit 0d0fcce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gluetool/tool.py
Expand Up @@ -224,11 +224,13 @@ def _handle_failure_core(self, failure, do_quit=True): # type: ignore # noqa
if failure.module:
msg = "Pipeline reported an exception in module '{}': {}".format(
failure.module.unique_name,
failure.exc_info[1]
str(failure.exc_info[1]) or repr(failure.exc_info[1])
)

else:
msg = "Pipeline reported an exception: {}".format(failure.exc_info[1])
msg = "Pipeline reported an exception: {}".format(
str(failure.exc_info[1]) or repr(failure.exc_info[1])
)

logger.error(msg, exc_info=failure.exc_info)

Expand Down

0 comments on commit 0d0fcce

Please sign in to comment.