Skip to content

Commit 31850df

Browse files
jtreanorfacebook-github-bot
authored andcommitted
Fix nullability warnings in RCTExceptionsManager (#24467)
Summary: There are a number of nullability warnings in `RCTExceptionsManager` when building React Native for iOS with Xcode 10.2. This resolves them without changing the existing behavior. See the warnings here: ![image](https://user-images.githubusercontent.com/1773641/56201323-89551380-6038-11e9-9998-b6a8d3d28f36.png) [iOS] [Fixed] - Fix nullability warnings in RCTExceptionsManager Pull Request resolved: #24467 Differential Revision: D14973485 Pulled By: cpojer fbshipit-source-id: 2fac9f067ac9418397c3913760a2403f9a2cc147
1 parent bddd9c7 commit 31850df

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

React/Modules/RCTExceptionsManager.h

+9-5
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,29 @@
99

1010
#import <React/RCTBridgeModule.h>
1111

12+
NS_ASSUME_NONNULL_BEGIN
13+
1214
@protocol RCTExceptionsManagerDelegate <NSObject>
1315

14-
- (void)handleSoftJSExceptionWithMessage:(NSString *)message stack:(NSArray *)stack exceptionId:(NSNumber *)exceptionId;
15-
- (void)handleFatalJSExceptionWithMessage:(NSString *)message stack:(NSArray *)stack exceptionId:(NSNumber *)exceptionId;
16+
- (void)handleSoftJSExceptionWithMessage:(nullable NSString *)message stack:(nullable NSArray *)stack exceptionId:(NSNumber *)exceptionId;
17+
- (void)handleFatalJSExceptionWithMessage:(nullable NSString *)message stack:(nullable NSArray *)stack exceptionId:(NSNumber *)exceptionId;
1618

1719
@optional
18-
- (void)updateJSExceptionWithMessage:(NSString *)message stack:(NSArray *)stack exceptionId:(NSNumber *)exceptionId;
20+
- (void)updateJSExceptionWithMessage:(nullable NSString *)message stack:(nullable NSArray *)stack exceptionId:(NSNumber *)exceptionId;
1921

2022
@end
2123

2224
@interface RCTExceptionsManager : NSObject <RCTBridgeModule>
2325

2426
- (instancetype)initWithDelegate:(id<RCTExceptionsManagerDelegate>)delegate;
2527

26-
- (void)reportSoftException:(NSString *)message stack:(NSArray<NSDictionary *> *)stack exceptionId:(nonnull NSNumber *)exceptionId;
27-
- (void)reportFatalException:(NSString *)message stack:(NSArray<NSDictionary *> *)stack exceptionId:(nonnull NSNumber *)exceptionId;
28+
- (void)reportSoftException:(nullable NSString *)message stack:(nullable NSArray<NSDictionary *> *)stack exceptionId:(NSNumber *)exceptionId;
29+
- (void)reportFatalException:(nullable NSString *)message stack:(nullable NSArray<NSDictionary *> *)stack exceptionId:(NSNumber *)exceptionId;
2830

2931
@property (nonatomic, weak) id<RCTExceptionsManagerDelegate> delegate;
3032

3133
@property (nonatomic, assign) NSUInteger maxReloadAttempts;
3234

3335
@end
36+
37+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)