inueni/birdy

more verbose error reporting

a7p opened this issue · 1 comments

a7p commented

https://github.com/inueni/birdy/blob/master/birdy/twitter.py#L266-L267
It would be nice to have the context of the triggering exception rerisen.

Dough Hellman on reraise exceptions:
http://doughellmann.com/2009/06/19/python-exception-handling-techniques.html
alternativly one could give the stacktrace of the inner exception to the new one.

Python 3 introduces raise … from … I don't know what the python2 best practice to archive this behavior.

Happy to accept a pull request. Sorry for the late reply.