Skip to content

Commit

Permalink
Fix grouping and use a useful culprit with new SwitchExceptionTypeAnd…
Browse files Browse the repository at this point in the history
…Message option (#58)
  • Loading branch information
JelteF authored and evalphobia committed Feb 21, 2018
1 parent 61ba158 commit 57846a8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,12 @@ func (hook *SentryHook) Fire(entry *logrus.Entry) error {
exc.Type = ""
}
if stConfig.SwitchExceptionTypeAndMessage {
exc.Type, exc.Value = exc.Value, exc.Type
packet.Interfaces = append(packet.Interfaces, currentStacktrace)
packet.Culprit = exc.Type + ": " + currentStacktrace.Culprit()
} else {
packet.Interfaces = append(packet.Interfaces, exc)
packet.Culprit = err.Error()
}
packet.Interfaces = append(packet.Interfaces, exc)
packet.Culprit = err.Error()
} else {
currentStacktrace := raven.NewStacktrace(stConfig.Skip, stConfig.Context, stConfig.InAppPrefixes)
if currentStacktrace != nil {
Expand Down

0 comments on commit 57846a8

Please sign in to comment.