Show ExitCodeException traceback in verbose mode

This commit is contained in:
James R. Barlow
2021-05-27 01:26:25 -07:00
parent f3715daf15
commit b4f2582766
+3 -1
View File
@@ -406,7 +406,9 @@ def run_pipeline(options, *, plugin_manager, api=False):
log.error("KeyboardInterrupt")
return ExitCode.ctrl_c
except (ExitCodeException if not api else NeverRaise) as e:
if str(e):
if options.verbose >= 1:
log.exception("ExitCodeException")
elif str(e):
log.error("%s: %s", type(e).__name__, str(e))
else:
log.error(type(e).__name__)