honeybadger-io / honeybadger-python

Send Python and Django errors to Honeybadger.
https://www.honeybadger.io/
MIT License
15 stars 25 forks source link

Call existing global exception hook if there is one? #11

Closed joshuap closed 8 years ago

joshuap commented 8 years ago

https://github.com/honeybadger-io/honeybadger-python/blob/master/honeybadger/__init__.py#L17

demsullivan commented 8 years ago

The default exception hook will still get called - it's stored in sys.__excepthook__

However if another library happens to implement it's own exception hook by setting sys.excepthook then this would override it (or it would override honeybadger, depending on the import order)

I think it's a pretty uncommon scenario but it wouldn't be difficult for us to grab the existing value of sys.excepthook and store it so we can call it from our own hook and play nice with others.

joshuap commented 8 years ago

:+1: