Пример #1
0
        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());
            }
        }
Пример #2
0
        static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Exception   systemException = e.ExceptionObject as Exception;
            MSException exception       = GenerateiOSException(systemException, true);

            byte[] exceptionBytes       = CrashesUtils.SerializeException(systemException);
            NSData wrapperExceptionData = NSData.FromArray(exceptionBytes);

            MSWrapperException wrapperException = new MSWrapperException
            {
                Exception     = exception,
                ExceptionData = wrapperExceptionData,
                ProcessId     = new NSNumber(Process.GetCurrentProcess().Id)
            };

            MSWrapperExceptionManager.SaveWrapperException(wrapperException);
        }
Пример #3
0
        static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Exception systemException = e.ExceptionObject as Exception;

            AppCenterLog.Error(LogTag, "Unhandled Exception:", systemException);
            MSException exception = GenerateiOSException(systemException, true);

            byte[]             exceptionBytes       = CrashesUtils.SerializeException(systemException) ?? new byte[0];
            NSData             wrapperExceptionData = NSData.FromArray(exceptionBytes);
            MSWrapperException wrapperException     = new MSWrapperException
            {
                Exception     = exception,
                ExceptionData = wrapperExceptionData,
                ProcessId     = new NSNumber(Process.GetCurrentProcess().Id)
            };

            AppCenterLog.Info(LogTag, "Saving wrapper exception...");
            MSWrapperExceptionManager.SaveWrapperException(wrapperException);
            AppCenterLog.Info(LogTag, "Saved wrapper exception.");
        }