Holds data for a single application crash event and provides access to all gathered crash reports.
static public int get_time(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.CrashReport self = (UnityEngine.CrashReport)checkSelf(l); pushValue(l, true); pushValue(l, self.time); return(2); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
private static void PopulateReports() { object obj = CrashReport.reportsLock; lock (obj) { if (CrashReport.internalReports == null) { string[] reports = CrashReport.GetReports(); CrashReport.internalReports = new List <CrashReport>(reports.Length); string[] array = reports; for (int i = 0; i < array.Length; i++) { string text = array[i]; double value; string reportData = CrashReport.GetReportData(text, out value); DateTime dateTime = new DateTime(1970, 1, 1); DateTime dateTime2 = dateTime.AddSeconds(value); CrashReport.internalReports.Add(new CrashReport(text, dateTime2, reportData)); } List <CrashReport> arg_AB_0 = CrashReport.internalReports; if (CrashReport.< > f__mg$cache0 == null) { CrashReport.< > f__mg$cache0 = new Comparison <CrashReport>(CrashReport.Compare); } arg_AB_0.Sort(CrashReport.< > f__mg$cache0); } } }
private static int Compare(CrashReport c1, CrashReport c2) { long ticks = c1.time.Ticks; long ticks2 = c2.time.Ticks; bool flag = ticks > ticks2; int result; if (flag) { result = 1; } else { bool flag2 = ticks < ticks2; if (flag2) { result = -1; } else { result = 0; } } return(result); }
static void CrashReport_text(JSVCall vc) { UnityEngine.CrashReport _this = (UnityEngine.CrashReport)vc.csObj; var result = _this.text; JSApi.setStringS((int)JSApi.SetType.Rval, result); }
private static void PopulateReports() { object obj = CrashReport.reportsLock; Monitor.Enter(obj); try { if (CrashReport.internalReports == null) { string[] reports = CrashReport.GetReports(); CrashReport.internalReports = new List <CrashReport>(reports.Length); string[] array = reports; for (int i = 0; i < array.Length; i++) { string text = array[i]; double value; string text2; CrashReport.GetReportData(text, out value, out text2); DateTime dateTime = new DateTime(1970, 1, 1); DateTime dateTime2 = dateTime.AddSeconds(value); CrashReport.internalReports.Add(new CrashReport(text, dateTime2, text2)); } CrashReport.internalReports.Sort(new Comparison <CrashReport>(CrashReport.Compare)); } } finally { Monitor.Exit(obj); } }
////////////////////// CrashReport /////////////////////////////////////// // constructors // fields static void CrashReport_time(JSVCall vc) { UnityEngine.CrashReport _this = (UnityEngine.CrashReport)vc.csObj; var result = _this.time; JSMgr.datax.setObject((int)JSApi.SetType.Rval, result); }
private static void PopulateReports() { object obj = CrashReport.reportsLock; lock (obj) { if (CrashReport.internalReports == null) { string[] reports = CrashReport.GetReports(); CrashReport.internalReports = new List <CrashReport>(reports.Length); foreach (string text in reports) { double value; string reportData = CrashReport.GetReportData(text, out value); DateTime dateTime = new DateTime(1970, 1, 1); DateTime dateTime2 = dateTime.AddSeconds(value); CrashReport.internalReports.Add(new CrashReport(text, dateTime2, reportData)); } List <CrashReport> list = CrashReport.internalReports; if (CrashReport.< > f__mg$cache0 == null) { CrashReport.< > f__mg$cache0 = new Comparison <CrashReport>(CrashReport.Compare); } list.Sort(CrashReport.< > f__mg$cache0); } } }
private static int Compare(CrashReport c1, CrashReport c2) { long ticks1 = c1.time.Ticks; long ticks2 = c2.time.Ticks; if (ticks1 > ticks2) return 1; return ticks1 < ticks2 ? -1 : 0; }
/// <summary> /// <para>Remove report from available reports list.</para> /// </summary> public void Remove() { if (!CrashReport.RemoveReport(this.id)) { return; } lock (CrashReport.reportsLock) CrashReport.internalReports.Remove(this); }
public static void RemoveAll() { CrashReport[] reports = CrashReport.reports; for (int i = 0; i < reports.Length; i++) { CrashReport crashReport = reports[i]; crashReport.Remove(); } }
static public int Remove(IntPtr l) { try { UnityEngine.CrashReport self = (UnityEngine.CrashReport)checkSelf(l); self.Remove(); return(0); } catch (Exception e) { return(error(l, e)); } }
static public int get_text(IntPtr l) { try { UnityEngine.CrashReport self = (UnityEngine.CrashReport)checkSelf(l); pushValue(l, self.text); return(1); } catch (Exception e) { return(error(l, e)); } }
private static int Compare(CrashReport c1, CrashReport c2) { long ticks1 = c1.time.Ticks; long ticks2 = c2.time.Ticks; if (ticks1 > ticks2) { return(1); } return(ticks1 < ticks2 ? -1 : 0); }
public void Remove() { if (CrashReport.RemoveReport(this.id)) { object obj = CrashReport.reportsLock; lock (obj) { CrashReport.internalReports.Remove(this); } } }
static public int Remove(IntPtr l) { try { UnityEngine.CrashReport self = (UnityEngine.CrashReport)checkSelf(l); self.Remove(); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static public int get_text(IntPtr l) { try { UnityEngine.CrashReport self = (UnityEngine.CrashReport)checkSelf(l); pushValue(l, self.text); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
public void Remove() { bool flag = CrashReport.RemoveReport(this.id); if (flag) { object obj = CrashReport.reportsLock; lock (obj) { CrashReport.internalReports.Remove(this); } } }
private static int Compare(CrashReport c1, CrashReport c2) { long ticks = c1.time.Ticks; long num2 = c2.time.Ticks; if (ticks > num2) { return 1; } if (ticks < num2) { return -1; } return 0; }
static int Compare(CrashReport c1, CrashReport c2) { long t1 = c1.time.Ticks; long t2 = c2.time.Ticks; if (t1 > t2) { return(1); } if (t1 < t2) { return(-1); } return(0); }
private static int Compare(CrashReport c1, CrashReport c2) { long ticks = c1.time.Ticks; long ticks2 = c2.time.Ticks; if (ticks > ticks2) { return(1); } if (ticks < ticks2) { return(-1); } return(0); }
public void Remove() { if (CrashReport.RemoveReport(this.id)) { object obj = CrashReport.reportsLock; Monitor.Enter(obj); try { CrashReport.internalReports.Remove(this); } finally { Monitor.Exit(obj); } } }
private static int Compare(CrashReport c1, CrashReport c2) { long ticks = c1.time.Ticks; long ticks2 = c2.time.Ticks; int result; if (ticks > ticks2) { result = 1; } else if (ticks < ticks2) { result = -1; } else { result = 0; } return(result); }
private static void PopulateReports() { lock (CrashReport.reportsLock) { if (CrashReport.internalReports != null) { return; } string[] local_1 = CrashReport.GetReports(); CrashReport.internalReports = new List <CrashReport>(local_1.Length); foreach (string item_0 in local_1) { double local_5; string local_6; CrashReport.GetReportData(item_0, out local_5, out local_6); DateTime local_7 = new DateTime(1970, 1, 1).AddSeconds(local_5); CrashReport.internalReports.Add(new CrashReport(item_0, local_7, local_6)); } CrashReport.internalReports.Sort(new Comparison <CrashReport>(CrashReport.Compare)); } }
private static void PopulateReports() { object obj = CrashReport.reportsLock; lock (obj) { bool flag = CrashReport.internalReports != null; if (!flag) { string[] reports = CrashReport.GetReports(); CrashReport.internalReports = new List <CrashReport>(reports.Length); string[] array = reports; for (int i = 0; i < array.Length; i++) { string text = array[i]; double value; string reportData = CrashReport.GetReportData(text, out value); DateTime dateTime = new DateTime(1970, 1, 1).AddSeconds(value); CrashReport.internalReports.Add(new CrashReport(text, dateTime, reportData)); } CrashReport.internalReports.Sort(new Comparison <CrashReport>(CrashReport.Compare)); } } }
static public int get_text(IntPtr l) { UnityEngine.CrashReport o = (UnityEngine.CrashReport)checkSelf(l); pushValue(l, o.text); return(1); }
public CountlyCrashReport(CrashReport unityReport) { error = unityReport; parameters = new Dictionary<string, string>() { {"_os", ""}, {"_os_version", ""}, {"_manufacture", ""}, {"_device", ""}, {"_resolution", ""}, {"_app_version", ""}, {"_cpu", ""}, {"_opengl", ""}, {"_rem_current", ""}, {"_ram_total", ""}, {"_disk_current", ""}, {"_disk_total", ""}, {"_bat", ""}, {"_orientation", ""}, {"_root", ""}, {"_online", ""}, {"_muted", ""}, {"_background", ""}, {"_name", ""}, {"_error", ""}, {"_nonfatal", ""}, {"_logs", ""}, {"_run", ""} }; DeviceInfo info = new DeviceInfo(); info.Update(); parameters["_os"] = info.OSName; parameters["_os_version"] = info.OSVersion; parameters["_app_version"] = CountlyManager.Instance.appVersion; parameters["_error"] = error.text; parameters["_online"] = Application.internetReachability.ToString(); parameters["_opengl"] = SystemInfo.graphicsDeviceVersion; parameters["_cpu"] = SystemInfo.processorType; parameters["_device"] = info.Device.ToString(); parameters["_resolution"] = info.Resolution; parameters["_ram_total"] = SystemInfo.systemMemorySize.ToString(); parameters["_run"] = Time.realtimeSinceStartup.ToString(); custom = new Dictionary<string, string>(); }