UNPKG

1.35 kBtext/x-cView Raw
1/*
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#import <Foundation/Foundation.h>
9
10#import <React/RCTBridgeModule.h>
11
12NS_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
37NS_ASSUME_NONNULL_END