Enriching exceptions with notes | Hugonweb Annotated Link Bibliography
https://docs.python.org/3/tutorial/errors.html#tut-exception-notes
You can add notes to exceptions in Python 3.13. Combined with f-strings, you can include extra debugging info.
except Exception as e:
'put extra debug info here')
e.add_note(f"x={x}")
e.add_note(raise