Skip to content

Commit

Permalink
Merge 0bb922c into 725723e
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrenskers authored Nov 9, 2022
2 parents 725723e + 0bb922c commit 5000a1e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Fix issue with invalid profiles uploading (#2358 and #2359)
- Call UIDevice methods on the main thread (#2369)
- Don't increase session's error count for dropped events (#2374)

## 7.30.0

Expand Down
5 changes: 5 additions & 0 deletions Sources/Sentry/SentryClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ - (SentryId *)captureError:(NSError *)error
{
SentryEvent *event = [self buildErrorEvent:error];
event = [self prepareEvent:event withScope:scope alwaysAttachStacktrace:YES];

if (event != nil) {
session = [SentrySDK.currentHub incrementSessionErrors];
}

return [self sendEvent:event withSession:session withScope:scope];
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryHub.m
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ - (SentryId *)captureError:(NSError *)error

- (SentryId *)captureError:(NSError *)error withScope:(SentryScope *)scope
{
SentrySession *currentSession = [self incrementSessionErrors];
SentrySession *currentSession = _session;
SentryClient *client = _client;
if (nil != client) {
if (nil != currentSession) {
Expand Down
2 changes: 2 additions & 0 deletions Sources/Sentry/include/SentryHub+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ SentryHub (Private)
withScope:(SentryScope *)scope
additionalEnvelopeItems:(NSArray<SentryEnvelopeItem *> *)additionalEnvelopeItems;

- (nullable SentrySession *)incrementSessionErrors;

@end

NS_ASSUME_NONNULL_END

0 comments on commit 5000a1e

Please sign in to comment.