Exemplo n.º 1
0
        static void OnUnhandledException(object sender, RaiseThrowableEventArgs e)
        {
            var exception = e.Exception;

            AppCenterLog.Error(LogTag, "Unhandled Exception:", exception);
            var javaThrowable  = exception as Throwable;
            var modelException = GenerateModelException(exception, true);

            byte[] rawException = javaThrowable == null?CrashesUtils.SerializeException(exception) : null;

            WrapperSdkExceptionManager.SaveWrapperException(Thread.CurrentThread(), javaThrowable, modelException, rawException);
        }
        private static void OnUnhandledException(object sender, RaiseThrowableEventArgs e)
        {
            var exception = e.Exception;

            MobileCenterLog.Error(Crashes.LogTag, "Unhandled Exception:", exception);
            if (!(exception is Java.Lang.Exception))
            {
                var    modelException = GenerateModelException(exception, true);
                byte[] rawException   = CrashesUtils.SerializeException(exception);
                WrapperSdkExceptionManager.SaveWrapperException(Thread.CurrentThread(), modelException, rawException);
            }
        }
Exemplo n.º 3
0
        static void OnUnhandledException(Exception exception, string source)
        {
            if (_exception == null)
            {
                AppCenterLog.Error(LogTag, $"Unhandled Exception from source={source}", exception);
                var    javaThrowable  = exception as Throwable;
                var    modelException = GenerateModelException(exception, true);
                byte[] rawException   = javaThrowable == null?CrashesUtils.SerializeException(exception) : null;

                WrapperSdkExceptionManager.SaveWrapperException(Thread.CurrentThread(), javaThrowable, modelException, rawException);
                _exception = exception;
            }
        }
Exemplo n.º 4
0
        static void PlatformTrackError(Exception exception, IDictionary <string, string> properties, ErrorAttachmentLog[] attachments)
        {
            ArrayList attachmentArray = null;

            if (attachments != null)
            {
                attachmentArray = new ArrayList();
                foreach (var attachment in attachments)
                {
                    if (attachment?.internalAttachment != null)
                    {
                        attachmentArray.Add(attachment.internalAttachment);
                    }
                    else
                    {
                        AppCenterLog.Warn(LogTag, "Skipping null ErrorAttachmentLog in Crashes.TrackError.");
                    }
                }
            }
            WrapperSdkExceptionManager.TrackException(GenerateModelException(exception, false), properties, attachmentArray);
        }
Exemplo n.º 5
0
 static void PlatformTrackError(Exception exception, IDictionary <string, string> properties)
 {
     WrapperSdkExceptionManager.TrackException(GenerateModelException(exception, false), properties);
 }
 public override void TrackException(Exception exception)
 {
     WrapperSdkExceptionManager.TrackException(GenerateModelException(exception, false));
 }