Skip to content

Commit

Permalink
Log exceptions, then raise
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubken committed Dec 27, 2021
1 parent f950864 commit bf5189e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dsdk/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ def context(
"""Context."""
configure_logger("dsdk")
logger.info(cls.ON, key)
yield cls.parse(argv=argv, env=env)
try:
yield cls.parse(argv=argv, env=env)
except BaseException as e:
logger.error(e)
raise
logger.info(cls.END, key)

@classmethod
Expand Down

0 comments on commit bf5189e

Please sign in to comment.