1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | #import <Foundation/Foundation.h>
|
9 |
|
10 | #import <React/RCTBridgeModule.h>
|
11 |
|
12 | NS_ASSUME_NONNULL_BEGIN
|
13 |
|
14 | @protocol RCTExceptionsManagerDelegate <NSObject>
|
15 |
|
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;
|
18 |
|
19 | @optional
|
20 | - (void)updateJSExceptionWithMessage:(nullable NSString *)message stack:(nullable NSArray *)stack exceptionId:(NSNumber *)exceptionId;
|
21 |
|
22 | @end
|
23 |
|
24 | @interface RCTExceptionsManager : NSObject <RCTBridgeModule>
|
25 |
|
26 | - (instancetype)initWithDelegate:(id<RCTExceptionsManagerDelegate>)delegate;
|
27 |
|
28 | - (void)reportSoftException:(nullable NSString *)message stack:(nullable NSArray<NSDictionary *> *)stack exceptionId:(double)exceptionId;
|
29 | - (void)reportFatalException:(nullable NSString *)message stack:(nullable NSArray<NSDictionary *> *)stack exceptionId:(double)exceptionId;
|
30 |
|
31 | @property (nonatomic, weak) id<RCTExceptionsManagerDelegate> delegate;
|
32 |
|
33 | @property (nonatomic, assign) NSUInteger maxReloadAttempts;
|
34 |
|
35 | @end
|
36 |
|
37 | NS_ASSUME_NONNULL_END
|