commit
fcd209f43c
9
index.js
9
index.js
@ -19,4 +19,13 @@ export default {
|
|||||||
reportEvent(message, params = null) {
|
reportEvent(message, params = null) {
|
||||||
AppMetrica.reportEvent(message, params);
|
AppMetrica.reportEvent(message, params);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends error with reason.
|
||||||
|
* @param {string} error
|
||||||
|
* @param {object} reason
|
||||||
|
*/
|
||||||
|
reportError(error, reason) {
|
||||||
|
AppMetrica.reportError(error, reason);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
@ -22,4 +22,8 @@ RCT_EXPORT_METHOD(reportEvent:(NSString *)message parameters:(nullable NSDiction
|
|||||||
[YMMYandexMetrica reportEvent:message parameters:params onFailure:NULL];
|
[YMMYandexMetrica reportEvent:message parameters:params onFailure:NULL];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RCT_EXPORT_METHOD(reportError:(NSString *)message reason:(NSString *)reason) {
|
||||||
|
NSException *exception = [[NSException alloc] initWithName:message reason:reason userInfo:nil];
|
||||||
|
[YMMYandexMetrica reportError:message exception:exception onFailure:NULL];
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
Loading…
Reference in New Issue
Block a user