internal ErrorReport(AndroidErrorReport androidReport) { Id = androidReport.Id; AppStartTime = DateTimeOffset.FromUnixTimeMilliseconds(androidReport.AppStartTime.Time); AppErrorTime = DateTimeOffset.FromUnixTimeMilliseconds(androidReport.AppErrorTime.Time); Device = androidReport.Device == null ? null : new Device(androidReport.Device); object androidThrowable; try { androidThrowable = androidReport.Throwable; } catch (Exception e) { AppCenterLog.Debug(Crashes.LogTag, "Cannot read throwable from java point of view, probably a .NET exception", e); androidThrowable = null; } AndroidDetails = new AndroidErrorDetails(androidThrowable, androidReport.ThreadName); iOSDetails = null; byte[] exceptionBytes = AndroidExceptionDataManager.LoadWrapperExceptionData(Java.Util.UUID.FromString(Id)); if (exceptionBytes != null) { StackTrace = CrashesUtils.DeserializeException(exceptionBytes); } }
internal ErrorReport(MSErrorReport msReport) { // If Id is not null we have loaded the report from the cache if (Id != null) { return; } Id = msReport.IncidentIdentifier; AppStartTime = NSDateToDateTimeOffset(msReport.AppStartTime); AppErrorTime = NSDateToDateTimeOffset(msReport.AppErrorTime); Device = msReport.Device == null ? null : new Device(msReport.Device); AndroidDetails = null; iOSDetails = new iOSErrorDetails(msReport.ReporterKey, msReport.Signal, msReport.ExceptionName, msReport.ExceptionReason, (uint)msReport.AppProcessIdentifier); MSWrapperException wrapperException = MSWrapperExceptionManager.LoadWrapperExceptionWithUUID(msReport.IncidentIdentifier); if (wrapperException != null && wrapperException.ExceptionData != null) { Exception = CrashesUtils.DeserializeException(wrapperException.ExceptionData.ToArray()); } }