Skip to content

Commit

Permalink
Add tracebacks to cli error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MNBrod authored Feb 9, 2023
1 parent 7315cd4 commit ea0efaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ddoitranslatormodule/cli_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,17 +351,20 @@ def main(table_loc, args):
except DDOITranslatorModuleNotFoundException as e:
logger.error("Failed to find Translator Module")
logger.error(e)
logger.error(traceback.format_exc())
sys.exit(1)
except ImportError as e:
logger.error("Found translator module, but failed to import it")
logger.error(e)
logger.error(traceback.format_exc())
sys.exit(1)
except TypeError as e:
logger.error(traceback.format_exc())
sys.exit(1)
except Exception as e:
logger.error("Unexpected exception encountered in CLI:")
logger.error(e)
logger.error(traceback.format_exc())
sys.exit(1)

# Not strictly needed, but it's nice to be explicit
Expand Down

0 comments on commit ea0efaf

Please sign in to comment.