I don't understand Python exceptions that well. But it's great to have the pattern of maintaining the stack trace when re-raising an exception. Thanks OP!<p>(In case anyone missed it)<p><pre><code> except foo.FooException as e:
raise BarException, BarException(e), sys.exc_info()[2]</code></pre>