Skip to content

v1.8.0

Compare
Choose a tag to compare
@kattrali kattrali released this 03 Dec 13:57
· 114 commits to master since this release
946ab52

Enhancements

  • Support unwrapping the underlying causes from an error, including attached stack trace contents if available.

    Any reported error which implements the following interface:

    type errorWithCause interface {
      Unwrap() error
    }

    will have the cause included as a previous error in the resulting event. The cause information will be available on the Bugsnag dashboard and is available for inspection in callbacks on the errors.Error object.

    bugsnag.OnBeforeNotify(func(event *bugsnag.Event, config *bugsnag.Configuration) error {
      if event.Error.Cause != nil {
        fmt.Printf("This error was caused by %v", event.Error.Cause.Error())
      }
      return nil
    })