static PlatformCrashes()
 {
     /* Peform custom setup around the native SDK's for setting signal handlers */
     MSCrashes.DisableMachExceptionHandler();
     MSWrapperCrashesHelper.SetCrashHandlerSetupDelegate(new CrashesInitializationDelegate());
     AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
 }
Ejemplo n.º 2
0
 static Crashes()
 {
     /* Perform custom setup around the native SDK's for setting signal handlers */
     MSCrashes.DisableMachExceptionHandler();
     MSWrapperCrashesHelper.SetCrashHandlerSetupDelegate(_crashesInitializationDelegate);
     AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
     MSCrashes.SetUserConfirmationHandler((reports) =>
     {
         if (ShouldAwaitUserConfirmation != null)
         {
             return(ShouldAwaitUserConfirmation());
         }
         return(false);
     });
     MSCrashes.SetDelegate(_crashesDelegate);
 }
Ejemplo n.º 3
0
        static void PlatformTrackError(Exception exception, IDictionary <string, string> properties, ErrorAttachmentLog[] attachments)
        {
            NSDictionary propertyDictionary = properties != null?StringDictToNSDict(properties) : new NSDictionary();

            NSMutableArray attachmentArray = new NSMutableArray();

            foreach (var attachment in attachments)
            {
                if (attachment?.internalAttachment != null)
                {
                    attachmentArray.Add(attachment.internalAttachment);
                }
                else
                {
                    AppCenterLog.Warn(LogTag, "Skipping null ErrorAttachmentLog in Crashes.TrackError.");
                }
            }
            MSWrapperCrashesHelper.TrackModelException(GenerateiOSException(exception, false), propertyDictionary, attachmentArray);
        }