Skip to content

Commit c701ed3

Browse files
authored
Add NO_ESCAPE to the block argument in objcTry (#24251)
1 parent be3f6b0 commit c701ed3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Modules/Sources/WordPressSharedObjC/Utility/WPException.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@implementation WPException
44

5-
+ (BOOL)objcTryBlock:(void (^)(void))block error:(NSError * __autoreleasing *)outError;
5+
+ (BOOL)objcTryBlock:(void (NS_NOESCAPE ^)(void))block error:(NSError * __autoreleasing *)outError;
66
{
77
@try {
88
if (block) {

Modules/Sources/WordPressSharedObjC/include/WPException.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
1111
@param outError If an exception is raised this variable returns the an error that wraps the exception.
1212
@return return true if no exception is raised and false otherwise.
1313
*/
14-
+ (BOOL)objcTryBlock:(void (^)(void))block error:(NSError * __autoreleasing *)outError;
14+
+ (BOOL)objcTryBlock:(void (NS_NOESCAPE ^)(void))block error:(NSError * __autoreleasing *)outError;
1515

1616
@end
1717

0 commit comments

Comments
 (0)