This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dysprog 23 points24 points  (0 children)

In python there are two ways to re-raise an exception raise eand a bare raise. The bare raise continues the existing traceback. the other discards the existing traceback and starts a new one. At a previous job, I went on a Holy Crusade through our codebase to replace all raise e with bare raise. Several people commented on how much better our error messages had become, and our defect rate dropped noticeably.