2015-03-23 15:07:33 -07:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-16 18:24:55 -08: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 15:07:33 -07:00
|
|
|
*/
|
2015-01-29 17:10:49 -08:00
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2016-11-23 07:47:52 -08:00
|
|
|
#import <React/RCTBridgeModule.h>
|
2015-01-29 17:10:49 -08:00
|
|
|
|
2015-03-12 12:51:44 -07:00
|
|
|
@protocol RCTExceptionsManagerDelegate <NSObject>
|
|
|
|
|
2015-11-05 12:19:56 -08:00
|
|
|
- (void)handleSoftJSExceptionWithMessage:(NSString *)message stack:(NSArray *)stack exceptionId:(NSNumber *)exceptionId;
|
|
|
|
- (void)handleFatalJSExceptionWithMessage:(NSString *)message stack:(NSArray *)stack exceptionId:(NSNumber *)exceptionId;
|
2015-11-03 14:45:46 -08:00
|
|
|
|
2015-11-05 12:19:56 -08:00
|
|
|
@optional
|
|
|
|
- (void)updateJSExceptionWithMessage:(NSString *)message stack:(NSArray *)stack exceptionId:(NSNumber *)exceptionId;
|
2015-09-17 18:12:46 -07:00
|
|
|
|
2015-03-12 12:51:44 -07:00
|
|
|
@end
|
|
|
|
|
2015-02-06 15:43:59 -08:00
|
|
|
@interface RCTExceptionsManager : NSObject <RCTBridgeModule>
|
2015-01-29 17:10:49 -08:00
|
|
|
|
2015-11-25 03:09:00 -08:00
|
|
|
- (instancetype)initWithDelegate:(id<RCTExceptionsManagerDelegate>)delegate;
|
2015-03-12 12:51:44 -07:00
|
|
|
|
2018-03-18 23:49:51 -07: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 04:09:00 -07:00
|
|
|
@property (nonatomic, weak) id<RCTExceptionsManagerDelegate> delegate;
|
|
|
|
|
2015-04-10 01:33:10 -07:00
|
|
|
@property (nonatomic, assign) NSUInteger maxReloadAttempts;
|
|
|
|
|
2015-01-29 17:10:49 -08:00
|
|
|
@end
|