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

Commit

Permalink
Fix: Ignore nil clients in new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Krasontovitsch committed Nov 20, 2017
1 parent c96349a commit 4a73d8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ func CaptureMessageAndWait(message string, tags map[string]string, interfaces ..
// waits for the message to be sent and returns an error.
func (client *Client) CaptureMessageAndConfirm(message string, tags map[string]string, interfaces ...Interface) (error, string) {
if client == nil {
return ErrClientNotConfigured, ""
return nil, ""
}

if client.shouldExcludeErr(message) {
Expand Down Expand Up @@ -733,7 +733,7 @@ func CaptureErrorAndWait(err error, tags map[string]string, interfaces ...Interf
// assures that the event was sent and returns an error
func (client *Client) CaptureErrorAndConfirm(err error, tags map[string]string, interfaces ...Interface) (error, string) {
if client == nil {
return ErrClientNotConfigured, ""
return nil, ""
}

if client.shouldExcludeErr(err.Error()) {
Expand Down

0 comments on commit 4a73d8e

Please sign in to comment.