dirac-institute / kbmod-wf

MIT License
0 stars 0 forks source link

Use context manager to reduce duplicated error logging code #31

Closed drewoldag closed 1 week ago

drewoldag commented 1 month ago

See @DinoBektesevic's comment here: https://github.com/dirac-institute/kbmod-wf/pull/30#discussion_r1718652840

Long story short, instead of a try ... catch statement, we can use a context manager to do most of the work.

Initial investigation wasn't producing the stack trace that I wanted, but this is probably just unfamiliarity with working with traceback objects.