5 Comments
Jan 13Liked by Bite Code!

Thank you for the interesting article! I think I can use this well.

A short question though: In this sentences: "If sys.excepthook != sys.excepthook`, then the function has already been replaced."

Should it not compare to the sys.__excepthook__ function?

Best!

Expand full comment

Just use friendly/friendly-traceback and let it take care of it! ;-) https://github.com/friendly-traceback/friendly

Expand full comment

Perhaps including a compressed and base64-encoded stack trace along with a user-friendly and helpful error message would be a good compromise: developers can still see the stack trace, but users will be less intimidated by a string of letters looking like some kind of "security token" than by a stack trace.

Expand full comment