Exemple #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);
        }
        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;
            }
        }
Exemple #3
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);
        }
Exemple #4
0
        static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            var systemException = e.ExceptionObject as Exception;

            AppCenterLog.Error(LogTag, "Unhandled Exception:", systemException);
            var exception            = GenerateiOSException(systemException, true);
            var exceptionBytes       = CrashesUtils.SerializeException(systemException) ?? new byte[0];
            var wrapperExceptionData = NSData.FromArray(exceptionBytes);
            var wrapperException     = new MSACWrapperException
            {
                Exception     = exception,
                ExceptionData = wrapperExceptionData,
                ProcessId     = new NSNumber(Process.GetCurrentProcess().Id)
            };

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