getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

fix: handle an existent but empty exc_info #1354

Closed das7pad closed 2 years ago

das7pad commented 5 years ago

In case there is no raised exception in the trace, all exc_info fields are None.

>>> sys.exc_info()
(None, None, None)

A traceback from an invalid object access on the exc_info members is not useful for debugging. Instead we should reach the logic to reject the exception with a ValueError.

https://github.com/getsentry/raven-python/blob/34c3a52b13316ce3200e56978ff01a277f33d27a/raven/events.py#L116-L117