feat:doric android and iOS's monitor add source parameter when exception

This commit is contained in:
pengfei.zhou
2020-02-22 15:37:35 +08:00
committed by osborn
parent f65b116607
commit abb1873b49
15 changed files with 139 additions and 50 deletions

View File

@@ -80,8 +80,8 @@ @interface DoricDefaultMonitor : NSObject <DoricMonitorProtocol>
@end
@implementation DoricDefaultMonitor
- (void)onException:(NSException *)exception {
DoricLog(@"DefaultMonitor - onException - %@", exception.reason);
- (void)onException:(NSException *)exception source:(NSString *)source {
DoricLog(@"DefaultMonitor - source: %@- onException - %@", source, exception.reason);
}
- (void)onLog:(DoricLogType)type message:(NSString *)message {
@@ -187,9 +187,9 @@ - (void)registerMonitor:(id <DoricMonitorProtocol>)monitor {
[self.monitors addObject:monitor];
}
- (void)onException:(NSException *)exception {
- (void)onException:(NSException *)exception source:(NSString *)source {
for (id <DoricMonitorProtocol> monitor in self.monitors) {
[monitor onException:exception];
[monitor onException:exception source:source];
}
}