public override void ReportError( string groupIdentifier, string condition, YandexAppMetricaErrorDetails errorDetails) { ymm_reportErrorWithIdentifierAndMessage(groupIdentifier, condition, JsonStringFromDictionary(errorDetails.ToHashtable())); }
public override void ReportError( string groupIdentifier, string condition, YandexAppMetricaErrorDetails errorDetails) { CallYandexMetricaPlugins("reportError", new[] { "String", "String", "PluginErrorDetails" }, groupIdentifier, condition, errorDetails.ToAndroidPluginErrorDetails()); }
internal static AndroidJavaObject ToAndroidPluginErrorDetails(this YandexAppMetricaErrorDetails self) { if (self == null) { return(null); } AndroidJavaObject errorDetails; using (AndroidJavaObject builder = new AndroidJavaObject("com.yandex.metrica.plugins.PluginErrorDetails$Builder")) { builder.Call <AndroidJavaObject>("withPlatform", self.Platform); builder.Call <AndroidJavaObject>("withVirtualMachineVersion", self.VirtualMachineVersion); if (self.ExceptionClass != null) { builder.Call <AndroidJavaObject>("withExceptionClass", self.ExceptionClass); } if (self.Message != null) { builder.Call <AndroidJavaObject>("withMessage", self.Message); } if (self.Stacktrace != null) { AndroidJavaObject androidStacktrace = CreateAndroidList(); foreach (YandexAppMetricaStackTraceItem stackTraceItem in self.Stacktrace) { AndroidJavaObject item = stackTraceItem.ToAndroidStackTraceItem(); if (item != null) { androidStacktrace.Call <bool>("add", item); } } builder.Call <AndroidJavaObject>("withStacktrace", androidStacktrace); } if (self.PluginEnvironment != null) { builder.Call <AndroidJavaObject>("withPluginEnvironment", self.PluginEnvironment.ToAndroidMap()); } errorDetails = builder.Call <AndroidJavaObject>("build"); } return(errorDetails); }
public override void ReportUnhandledException(Exception exception) { try { ReportUnhandledException(YandexAppMetricaErrorDetails.From(exception)); } catch (Exception e) { #if DEBUG Debug.Log("[AppMetrica] Failed to parse stacktrace: " + e.Message + "\n" + e.StackTrace); #endif // use old crash format ymm_reportError(exception.Message, exception.StackTrace); } }
public override void ReportErrorFromLogCallback(string condition, string stackTrace) { try { ReportUnhandledException(YandexAppMetricaErrorDetails.FromLogCallback(condition, stackTrace)); } catch (Exception e) { #if DEBUG Debug.Log("[AppMetrica] Failed to parse stacktrace: " + e.Message + "\n" + e.StackTrace); #endif // use old crash format ymm_reportErrorWithIdentifier(condition, condition, stackTrace); } }
public override void ReportError(string groupIdentifier, string condition, Exception exception) { try { ReportError(groupIdentifier, condition, exception == null ? null : YandexAppMetricaErrorDetails.From(exception)); } catch (Exception e) { #if DEBUG Debug.Log("[AppMetrica] Failed to parse stacktrace: " + e.Message + "\n" + e.StackTrace); #endif // use old crash format ymm_reportErrorWithException(groupIdentifier, condition, JsonStringFromDictionary(exception.ToHashtable())); } }
public override void ReportUnhandledException(Exception exception) { try { ReportUnhandledException(YandexAppMetricaErrorDetails.From(exception)); } catch (Exception e) { #if DEBUG Debug.Log("[AppMetrica] Failed to parse stacktrace: " + e.Message + "\n" + e.StackTrace); #endif // use old crash format CallAppMetrica("reportUnhandledException", new[] { "Throwable" }, exception.ToAndroidThrowable()); } }
public override void ReportErrorFromLogCallback(string condition, string stackTrace) { try { ReportUnhandledException(YandexAppMetricaErrorDetails.FromLogCallback(condition, stackTrace)); } catch (Exception e) { #if DEBUG Debug.Log("[AppMetrica] Failed to parse stacktrace: " + e.Message + "\n" + e.StackTrace); #endif // use old crash format AndroidJavaObject throwableObject = stackTrace == null ? null : ThrowableFromStringStackTrace(stackTrace); CallAppMetrica("reportError", new[] { "String", "String", "Throwable" }, condition, condition, throwableObject); } }
public override void ReportError(string groupIdentifier, string condition, Exception exception) { try { ReportError(groupIdentifier, condition, exception == null ? null : YandexAppMetricaErrorDetails.From(exception)); } catch (Exception e) { #if DEBUG Debug.Log("[AppMetrica] Failed to parse stacktrace: " + e.Message + "\n" + e.StackTrace); #endif // use old crash format CallAppMetrica("reportError", new[] { "String", "String", "Throwable" }, groupIdentifier, condition, exception.ToAndroidThrowable()); } }
public static Hashtable ToHashtable(this YandexAppMetricaErrorDetails self) { if (self == null) { return(null); } Hashtable data = new Hashtable { { "Platform", self.Platform }, { "VirtualMachineVersion", self.VirtualMachineVersion } }; if (self.ExceptionClass != null) { data["ExceptionClass"] = self.ExceptionClass; } if (self.Message != null) { data["Message"] = self.Message; } if (self.Stacktrace != null) { Hashtable stacktrace = new Hashtable(); for (int i = 0; i < self.Stacktrace.Count; ++i) { stacktrace[i.ToString()] = self.Stacktrace[i].ToHashtable(); } data["Stacktrace"] = stacktrace; } if (self.PluginEnvironment != null) { data["PluginEnvironment"] = new Hashtable(self.PluginEnvironment); } return(data); }
public abstract void ReportError( string groupIdentifier, string condition, YandexAppMetricaErrorDetails errorDetails );
public override void ReportUnhandledException(YandexAppMetricaErrorDetails errorDetails) { }
public override void ReportError(YandexAppMetricaErrorDetails errorDetails, string condition) { }
public override void ReportError(YandexAppMetricaErrorDetails errorDetails, string condition) { ymm_reportErrorWithMessage(JsonStringFromDictionary(errorDetails.ToHashtable()), condition); }
public override void ReportUnhandledException(YandexAppMetricaErrorDetails errorDetails) { CallYandexMetricaPlugins("reportUnhandledException", new[] { "PluginErrorDetails" }, errorDetails.ToAndroidPluginErrorDetails()); }
public override void ReportUnhandledException(YandexAppMetricaErrorDetails errorDetails) { ymm_reportUnhandledException(JsonStringFromDictionary(errorDetails.ToHashtable())); }
public abstract void ReportError(YandexAppMetricaErrorDetails errorDetails, string condition);
public abstract void ReportUnhandledException(YandexAppMetricaErrorDetails errorDetails);
public override void ReportError(YandexAppMetricaErrorDetails errorDetails, string condition) { CallYandexMetricaPlugins("reportError", new[] { "PluginErrorDetails", "String" }, errorDetails.ToAndroidPluginErrorDetails(), condition); }