Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Support extracting extra infromation from errors without Cause() #240

Merged
merged 1 commit into from
Mar 5, 2019
Merged

Support extracting extra infromation from errors without Cause() #240

merged 1 commit into from
Mar 5, 2019

Conversation

jwagner
Copy link
Contributor

@jwagner jwagner commented Mar 4, 2019

The current implementation of extractExtra() requires an interface containing both Cause() and ExtraInfo().
This means that no ExtraInfo() can be extracted from root causes..

I'm not 100% sure if this change is backwards compatible for lack of knowledge of Go but from all I know it should be.

@kamilogorek kamilogorek merged commit 04157b8 into getsentry:master Mar 5, 2019
@kamilogorek
Copy link
Contributor

Looks good, thanks!

@giautm
Copy link

giautm commented Mar 15, 2019

I really dont like to import getsentry/raven-go to just reference to raven.Extra to implement ExtraInfo() Extra. Can we simplify by define ExtraInfo() map[string]interface{} instead?

@jwagner
Copy link
Contributor Author

jwagner commented Mar 16, 2019

@giautm I thought about that too. The problem is that it breaks API compatibility unless a type alias is used but since Go 1.7 needs to be supported that won't work either. I guess it would be possibly to define yet another Interface and keep the old one around for backwards compatibility until the next major it seems a bit messy too but would probably be the route I'd take.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants