Calling a hook function every time an Exception is raised

If you want to log uncaught exceptions, just use sys.excepthook.

I’m not sure I see the value of logging all raised exceptions, since lots of libraries will raise/catch exceptions internally for things you probably won’t care about.

Leave a Comment