Skip to content

Commit 9b0b083

Browse files
antonisclaude
andcommitted
fix(replay): Keep @Try on single line in fallback path
clang-format was splitting @Try into "@" and "try {" on separate lines in the fallback path. While clang accepts this, it's unusual and breaks grep discoverability. Wrapped with clang-format off/on pragmas to preserve single-line formatting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1cdb266 commit 9b0b083

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/core/ios/RNSentry.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,14 +831,15 @@ + (BOOL)captureReplayWithReturnValue
831831
}
832832
// Fallback: call the void method and assume success if a replay ID exists.
833833
// This preserves the old behavior when the integration isn't directly accessible.
834-
@
835-
try {
834+
// clang-format off
835+
@try {
836836
[PrivateSentrySDKOnly captureReplay];
837837
return [PrivateSentrySDKOnly getReplayId] != nil;
838838
} @catch (NSException *exception) {
839839
NSLog(@"[RNSentry] Failed to call captureReplay fallback: %@", exception);
840840
return NO;
841841
}
842+
// clang-format on
842843
#else
843844
return NO;
844845
#endif

0 commit comments

Comments
 (0)