Skip to content

Commit

Permalink
Update version in bugsnag.go to 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DariaKunoichi committed Feb 21, 2024
1 parent d528c5b commit 8754ab3
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions v2/bugsnag.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

// Version defines the version of this Bugsnag notifier
const Version = "2.2.0"
const Version = "2.2.1"

var panicHandlerOnce sync.Once
var sessionTrackerOnce sync.Once
Expand Down Expand Up @@ -91,11 +91,13 @@ func Notify(err error, rawData ...interface{}) error {
// The rawData is used to send extra information along with any
// panics that are handled this way.
// Usage:
// go func() {
// ctx := bugsnag.StartSession(context.Background())
// defer bugsnag.AutoNotify(ctx)
// // (possibly crashy code)
// }()
//
// go func() {
// ctx := bugsnag.StartSession(context.Background())
// defer bugsnag.AutoNotify(ctx)
// // (possibly crashy code)
// }()
//
// See also: bugsnag.Recover()
func AutoNotify(rawData ...interface{}) {
if err := recover(); err != nil {
Expand All @@ -122,18 +124,22 @@ func AutoNotify(rawData ...interface{}) {
// The rawData is used to send extra information along with
// any panics that are handled this way
// Usage:
// go func() {
// ctx := bugsnag.StartSession(context.Background())
// defer bugsnag.Recover(ctx)
// // (possibly crashy code)
// }()
//
// go func() {
// ctx := bugsnag.StartSession(context.Background())
// defer bugsnag.Recover(ctx)
// // (possibly crashy code)
// }()
//
// If you wish that any panics caught by the call to Recover shall affect your
// stability score (it does not by default):
// go func() {
// ctx := bugsnag.StartSession(context.Background())
// defer bugsnag.Recover(ctx, bugsnag.HandledState{Unhandled: true})
// // (possibly crashy code)
// }()
//
// go func() {
// ctx := bugsnag.StartSession(context.Background())
// defer bugsnag.Recover(ctx, bugsnag.HandledState{Unhandled: true})
// // (possibly crashy code)
// }()
//
// See also: bugsnag.AutoNotify()
func Recover(rawData ...interface{}) {
if err := recover(); err != nil {
Expand Down

0 comments on commit 8754ab3

Please sign in to comment.