@@ -403,23 +403,23 @@ type Client struct {
403
403
// Initialize a default *Client instance
404
404
var DefaultClient = newClient (nil )
405
405
406
- func (c * Client ) SetIgnoreErrors (errs []string ) error {
406
+ func (client * Client ) SetIgnoreErrors (errs []string ) error {
407
407
joinedRegexp := strings .Join (errs , "|" )
408
408
r , err := regexp .Compile (joinedRegexp )
409
409
if err != nil {
410
410
return fmt .Errorf ("failed to compile regexp %q for %q: %v" , joinedRegexp , errs , err )
411
411
}
412
412
413
- c .mu .Lock ()
414
- c .ignoreErrorsRegexp = r
415
- c .mu .Unlock ()
413
+ client .mu .Lock ()
414
+ client .ignoreErrorsRegexp = r
415
+ client .mu .Unlock ()
416
416
return nil
417
417
}
418
418
419
- func (c * Client ) shouldExcludeErr (errStr string ) bool {
420
- c .mu .RLock ()
421
- defer c .mu .RUnlock ()
422
- return c .ignoreErrorsRegexp != nil && c .ignoreErrorsRegexp .MatchString (errStr )
419
+ func (client * Client ) shouldExcludeErr (errStr string ) bool {
420
+ client .mu .RLock ()
421
+ defer client .mu .RUnlock ()
422
+ return client .ignoreErrorsRegexp != nil && client .ignoreErrorsRegexp .MatchString (errStr )
423
423
}
424
424
425
425
func SetIgnoreErrors (errs ... string ) error {
@@ -666,7 +666,7 @@ func CaptureMessageAndWait(message string, tags map[string]string, interfaces ..
666
666
return DefaultClient .CaptureMessageAndWait (message , tags , interfaces ... )
667
667
}
668
668
669
- // CaptureErrors formats and delivers an error to the Sentry server.
669
+ // CaptureError formats and delivers an error to the Sentry server.
670
670
// Adds a stacktrace to the packet, excluding the call to this method.
671
671
func (client * Client ) CaptureError (err error , tags map [string ]string , interfaces ... Interface ) string {
672
672
if client == nil {
@@ -683,13 +683,13 @@ func (client *Client) CaptureError(err error, tags map[string]string, interfaces
683
683
684
684
cause := pkgErrors .Cause (err )
685
685
686
- packet := NewPacket (err .Error (), append (append (interfaces , client .context .interfaces ()... ), NewException (cause , GetOrNewStacktrace (cause , 1 , 3 , client .includePaths )))... )
686
+ packet := NewPacket (err .Error (), append (append (interfaces , client .context .interfaces ()... ), NewException (cause , GetOrNewStacktrace (err , 1 , 3 , client .includePaths )))... )
687
687
eventID , _ := client .Capture (packet , tags )
688
688
689
689
return eventID
690
690
}
691
691
692
- // CaptureErrors formats and delivers an error to the Sentry server using the default *Client.
692
+ // CaptureError formats and delivers an error to the Sentry server using the default *Client.
693
693
// Adds a stacktrace to the packet, excluding the call to this method.
694
694
func CaptureError (err error , tags map [string ]string , interfaces ... Interface ) string {
695
695
return DefaultClient .CaptureError (err , tags , interfaces ... )
@@ -707,7 +707,7 @@ func (client *Client) CaptureErrorAndWait(err error, tags map[string]string, int
707
707
708
708
cause := pkgErrors .Cause (err )
709
709
710
- packet := NewPacket (err .Error (), append (append (interfaces , client .context .interfaces ()... ), NewException (cause , GetOrNewStacktrace (cause , 1 , 3 , client .includePaths )))... )
710
+ packet := NewPacket (err .Error (), append (append (interfaces , client .context .interfaces ()... ), NewException (cause , GetOrNewStacktrace (err , 1 , 3 , client .includePaths )))... )
711
711
eventID , ch := client .Capture (packet , tags )
712
712
if eventID != "" {
713
713
<- ch
0 commit comments