Implement sendError for Android

This commit is contained in:
Aleksei Androsov
2017-09-30 17:50:02 +03:00
parent 60d2a2b63e
commit 8c036a64b7
3 changed files with 14 additions and 2 deletions

View File

@@ -41,6 +41,15 @@ public class AppMetricaModule extends ReactContextBaseJavaModule {
}
}
@ReactMethod
public void reportError(String message) {
try {
Integer.valueOf("00xffWr0ng");
} catch (Throwable error) {
YandexMetrica.reportError(message, error);
}
}
@ReactMethod
public void reportEvent(String message, @Nullable ReadableMap params) {
if (params != null) {