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

Conversation

valentin-krasontovitsch
Copy link

The client's capture method returns an error channel that according to
the docs is intended to be used for checking if a packet was sent
successfully whenever that is important.

The ...AndWait methods use this channel, but only to wait. They do
not capture the possible error coming from that channel.

The changes in this commit suggest to use the error and return it, so
that a user may check whether a packet was sent successfully using the
top level methods (like CaptureMessageAndWait), instead of having to
write their own.

Breaking changes:

The signatures of the following methods are changed:

- [Client.]CaptureMessageAndWait
- [Client.]CaptureErrorAndWait
- [Client.]CapturePanicAndWait

Work on #84

The client's capture method returns an error channel that according to
the docs is intended to be used for checking if a packet was sent
successfully whenever that is important.

The `...AndWait` methods use this channel, but only to wait. They do
not capture the possible error coming from that channel.

The changes in this commit suggest to use the error and return it, so
that a user may check whether a packet was sent successfully using the
top level methods (like `CaptureMessageAndWait`), instead of having to
write their own.

**Breaking changes**:

The signatures of the following methods are changed:

```
- [Client.]CaptureMessageAndWait
- [Client.]CaptureErrorAndWait
- [Client.]CapturePanicAndWait
```

Work on getsentry#84
@valentin-krasontovitsch
Copy link
Author

Closed in favor of #161 which resolves the issue by extending the API with new methods instead of introducing breaking changes in existing methods.

@valentin-krasontovitsch valentin-krasontovitsch deleted the 84_return_errors_if_packets_not_send branch February 20, 2018 13:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant