getsentry / raven-go

Sentry client in Go
https://sentry.io
BSD 3-Clause "New" or "Revised" License
561 stars 148 forks source link

Raven assumes panics are represented by errors #194

Closed alexflint closed 5 years ago

alexflint commented 6 years ago

In RecoveryHandler, raven does the following:

if rval := recover(); rval != nil {
  ...
  ... GetOrNewStackTrace(rval.(error), ...)
}

However, panics can be represented by any interface{} in go, and this code actually causes another panic if a panic is not represented by an error.

wizardist commented 6 years ago

I think this has been fixed. https://github.com/getsentry/raven-go/commit/ba97302481f2659d9ae93288e422acb942093b26