2015-03-23 22:07:33 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2015-03-23 22:07:33 +00:00
|
|
|
*/
|
2015-01-30 01:10:49 +00:00
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2016-11-23 15:47:52 +00:00
|
|
|
#import <React/RCTBridgeModule.h>
|
2015-01-30 01:10:49 +00:00
|
|
|
|
2015-03-12 19:51:44 +00:00
|
|
|
@protocol RCTExceptionsManagerDelegate <NSObject>
|
|
|
|
|
2015-11-05 20:19:56 +00:00
|
|
|
- (void)handleSoftJSExceptionWithMessage:(NSString *)message stack:(NSArray *)stack exceptionId:(NSNumber *)exceptionId;
|
|
|
|
- (void)handleFatalJSExceptionWithMessage:(NSString *)message stack:(NSArray *)stack exceptionId:(NSNumber *)exceptionId;
|
2015-11-03 22:45:46 +00:00
|
|
|
|
2015-11-05 20:19:56 +00:00
|
|
|
@optional
|
|
|
|
- (void)updateJSExceptionWithMessage:(NSString *)message stack:(NSArray *)stack exceptionId:(NSNumber *)exceptionId;
|
2015-09-18 01:12:46 +00:00
|
|
|
|
2015-03-12 19:51:44 +00:00
|
|
|
@end
|
|
|
|
|
2015-02-06 23:43:59 +00:00
|
|
|
@interface RCTExceptionsManager : NSObject <RCTBridgeModule>
|
2015-01-30 01:10:49 +00:00
|
|
|
|
2015-11-25 11:09:00 +00:00
|
|
|
- (instancetype)initWithDelegate:(id<RCTExceptionsManagerDelegate>)delegate;
|
2015-03-12 19:51:44 +00:00
|
|
|
|
2018-03-19 06:49:51 +00:00
|
|
|
- (void)reportSoftException:(NSString *)message stack:(NSArray<NSDictionary *> *)stack exceptionId:(nonnull NSNumber *)exceptionId;
|
|
|
|
- (void)reportFatalException:(NSString *)message stack:(NSArray<NSDictionary *> *)stack exceptionId:(nonnull NSNumber *)exceptionId;
|
|
|
|
|
2017-05-26 11:09:00 +00:00
|
|
|
@property (nonatomic, weak) id<RCTExceptionsManagerDelegate> delegate;
|
|
|
|
|
2015-04-10 08:33:10 +00:00
|
|
|
@property (nonatomic, assign) NSUInteger maxReloadAttempts;
|
|
|
|
|
2015-01-30 01:10:49 +00:00
|
|
|
@end
|