diff --git a/CHANGELOG.md b/CHANGELOG.md index ab94ef0d248..e8be04252d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- feat: Error Screenshots (#1751) +- feat: Attach screenshots for errors (#1751) - fix: Remove authenticated pointer stripping for iOS backtraces (#1757) ## 7.13.0 diff --git a/Sources/Sentry/Public/SentryOptions.h b/Sources/Sentry/Public/SentryOptions.h index ef8269b79fd..59cd27af4b5 100644 --- a/Sources/Sentry/Public/SentryOptions.h +++ b/Sources/Sentry/Public/SentryOptions.h @@ -193,7 +193,7 @@ NS_SWIFT_NAME(Options) @property (nonatomic, assign) BOOL enableUIViewControllerTracking; /** - * Automatically attaches a screenshot when an error or exception is captured. + * Automatically attaches a screenshot when capturing an error or exception. * * Default value is NO */ diff --git a/Sources/Sentry/SentryClient.m b/Sources/Sentry/SentryClient.m index fae258957cf..a3a853dfac2 100644 --- a/Sources/Sentry/SentryClient.m +++ b/Sources/Sentry/SentryClient.m @@ -158,7 +158,7 @@ - (SentryId *)captureException:(NSException *)exception return [self sendEvent:event withSession:session withScope:scope]; } -- (SentryEvent *)buildExceptionEvent:(NSException *)exception scope:(SentryScope *)scope +- (SentryEvent *)buildExceptionEvent:(NSException *)exception { SentryEvent *event = [[SentryEvent alloc] initWithLevel:kSentryLevelError]; SentryException *sentryException = [[SentryException alloc] initWithValue:exception.reason @@ -189,7 +189,7 @@ - (SentryId *)captureError:(NSError *)error return [self sendEvent:event withSession:session withScope:scope]; } -- (SentryEvent *)buildErrorEvent:(NSError *)error scope:(SentryScope *)scope +- (SentryEvent *)buildErrorEvent:(NSError *)error { SentryEvent *event = [[SentryEvent alloc] initWithError:error]; diff --git a/Tests/SentryTests/SentryClientTests.swift b/Tests/SentryTests/SentryClientTests.swift index 5fb61a4ae9c..f3b8693afab 100644 --- a/Tests/SentryTests/SentryClientTests.swift +++ b/Tests/SentryTests/SentryClientTests.swift @@ -253,7 +253,7 @@ class SentryClientTest: XCTestCase { sut.attachmentProcessor = processor sut.captureError(error, with: fixture.session, with: Scope()) - let sendedAttachments = fixture.transportAdapter.sentEventsWithSessionTraceState.first?.attachments ?? [] + let sentAttachments = fixture.transportAdapter.sentEventsWithSessionTraceState.first?.attachments ?? [] XCTAssertEqual(sendedAttachments.count, 1) XCTAssertEqual(extraAttachment, sendedAttachments.first)