in Assets/Puppet/PuppetCrashes.cs [199:252]
private IEnumerator LastCrashReportCoroutine()
{
var hasCrashed = Crashes.HasCrashedInLastSessionAsync();
yield return hasCrashed;
if (hasCrashed.Result)
{
var lastSessionReport = Crashes.GetLastSessionCrashReportAsync();
yield return lastSessionReport;
var errorReport = lastSessionReport.Result;
if (errorReport != null)
{
var status = new StringBuilder();
status.AppendLine("Message: " + errorReport.Exception.Message);
status.AppendLine("App Start Time: " + errorReport.AppStartTime);
status.AppendLine("App Error Time: " + errorReport.AppErrorTime);
status.AppendLine("Report Id: " + errorReport.Id);
status.AppendLine("Process Id: " + errorReport.ProcessId);
status.AppendLine("Reporter Key: " + errorReport.ReporterKey);
status.AppendLine("Reporter Signal: " + errorReport.ReporterSignal);
status.AppendLine("Is App Killed: " + errorReport.IsAppKill);
status.AppendLine("Thread Name: " + errorReport.ThreadName);
status.AppendLine("Stack Trace: " + errorReport.Exception.StackTrace);
status.AppendLine("IsCrash: " + errorReport.IsCrash);
if (errorReport.Device != null)
{
status.AppendLine("Device.SdkName: " + errorReport.Device.SdkName);
status.AppendLine("Device.SdkVersion: " + errorReport.Device.SdkVersion);
status.AppendLine("Device.Model: " + errorReport.Device.Model);
status.AppendLine("Device.OemName: " + errorReport.Device.OemName);
status.AppendLine("Device.OsName: " + errorReport.Device.OsName);
status.AppendLine("Device.OsVersion: " + errorReport.Device.OsVersion);
status.AppendLine("Device.OsBuild: " + errorReport.Device.OsBuild);
status.AppendLine("Device.OsApiLevel: " + errorReport.Device.OsApiLevel);
status.AppendLine("Device.Locale: " + errorReport.Device.Locale);
status.AppendLine("Device.TimeZoneOffset: " + errorReport.Device.TimeZoneOffset);
status.AppendLine("Device.ScreenSize: " + errorReport.Device.ScreenSize);
status.AppendLine("Device.AppVersion: " + errorReport.Device.AppVersion);
status.AppendLine("Device.CarrierName: " + errorReport.Device.CarrierName);
status.AppendLine("Device.CarrierCountry: " + errorReport.Device.CarrierCountry);
status.AppendLine("Device.AppBuild: " + errorReport.Device.AppBuild);
status.AppendLine("Device.AppNamespace: " + errorReport.Device.AppNamespace);
}
LastSessionCrashReport.text = status.ToString();
}
else
{
LastSessionCrashReport.text = "App has crashed during the last session but no error report has been found";
}
}
else
{
LastSessionCrashReport.text = "App has not crashed during the last session";
}
}