lisa-lab/pylearn2 — pull request #1039 by bartvm (2014-07-23 21:53:38+00:00)
Title: Reraising exceptions properly

I adapted the code from https://github.com/dcramer/reraise to include the original error message. This new method of reraising exceptions should retain the original traceback. So if you have pdb or ipdb on, you will receive the reraised exception with a more informative message, but your traceback will actually be where the original error occurred. It will also append the original exceptions and their messages to the new message by default.

See also https://groups.google.com/forum/#!topic/pylearn-dev/UbWz5tQDH5M