Skip to content

Commit 28a007a

Browse files
committed
Use clearer function names
1 parent 5b8069b commit 28a007a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

platform-includes/capture-error/apple.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ enum MyCustomError: Error {
77
case myFirstIssue
88
}
99

10-
func thisFunctionWillThrow() throws {
10+
func thisFunctionThrows() throws {
1111
throw MyCustomError.myFirstIssue
1212
}
1313

1414
do {
15-
try thisFunctionWillThrow()
15+
try thisFunctionThrows()
1616
} catch {
1717
SentrySDK.capture(error: error)
1818
}
@@ -21,17 +21,18 @@ do {
2121
```objc {tabTitle:Objective-C}
2222
@import Sentry;
2323

24-
- (void)thisFunctionWillReturnAnError:(NSError **)error {
24+
- (void)thisFunctionReturnsAnError:(NSError **)error {
2525
*error = [NSError errorWithDomain:@"com.example.myapp"
2626
code:1001
2727
userInfo:@{
2828
NSLocalizedDescriptionKey: @"Something went wrong."
2929
}];
3030
}
31+
3132
// ... Your code
3233

3334
NSError *error = nil;
34-
[self thisFunctionWillReturnAnError:&error];
35+
[self thisFunctionReturnsAnError:&error];
3536

3637
if (error) {
3738
[SentrySDK captureError:error];

0 commit comments

Comments
 (0)