Exception

In Python, sometimes you just need to catch all exceptions and show which one was it:

try:
    do_something_important()
except Exception as e:
    e_name = type(e).__name__
    logger.error("Exception happened (%s) while doing things", e_name)

Updated: July 25, 2025 — 19:34

Leave a Reply