Example #1
0
        private async void OnUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
        {
            e.Handled = true;
            await Log(e.Exception);

            PrismUnityApplication.Current.Exit();
        }
        private void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs args)
        {
            var mvxLogProvider = Mvx.IoCProvider.Resolve <IMvxLogProvider>();
            var mvxLog         = mvxLogProvider.GetLogFor(GetType());

            mvxLog.TraceException(args.Exception.Message, args.Exception);
        }
 private async void unhandledExceptionHandler(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
 {
     if (!IsConsentGiven(ConsentFeatures.Crashes))
     {
         return;
     }
     await RecordExceptionInternal(e.Message, null, null, true);
 }
Example #4
0
        private void OnAppUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs args)
        {
            args.Handled = true;

            this.EventLogger.WriteCritical(
                args.Exception != null
                    ? $"An unhandled exception was thrown. Error: {args.Exception}"
                    : "An unhandled exception was thrown. Error: No exception information was available.");
        }
Example #5
0
 public static void Logging(Windows.UI.Xaml.UnhandledExceptionEventArgs e, IDictionary <string, string> properties = null)
 {
     if (!Inited)
     {
         InitLogger();
     }
     // Exceptions
     HockeyClient.Current.TrackException(e.Exception, properties);
 }
Example #6
0
        public static void HandleExceptions(
#if !__IOS__
            object sender,
#endif

#if WINDOWS_UWP
            Windows.UI.Xaml.UnhandledExceptionEventArgs
#elif __ANDROID__
            Android.Runtime.RaiseThrowableEventArgs
Example #7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
        {
            // TODO: Implementing the logging and analytics, such as HockeyApp or something like that
#if DEBUG
            System.Diagnostics.Debug.WriteLine($"Exception: {e.Message}");
            if (System.Diagnostics.Debugger.IsAttached)
            {
                System.Diagnostics.Debugger.Break();
            }
#endif
        }
Example #8
0
 void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
 {
     global::System.Diagnostics.Debug.WriteLine(e.Message);
     global::System.Diagnostics.Debug.WriteLine(e.Exception.StackTrace);
     global::System.Diagnostics.Debug.WriteLine(e.Handled);
     global::System.Diagnostics.Debug.WriteLine(sender);
     //var dialogService = _container.Resolve<IDialogService>();
     //string content =e.ToString();
     //string title = "Error";
     //string exitCommand = "Exit";
     //var exit = new UICommand(exitCommand, ex => { Current.Exit(); });
     //dialogService.Show(content, title, exit);
 }
Example #9
0
        private async void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
        {
            string msg = null;

            // Main Handler
            HandleException(ref msg, e.Exception);

            e.Handled = true;
            if (StartupScreen.Starting)
            {
                return;
            }

            // Notify UI
            try
            {
                await MainPage.Current.SendResponse(msg).ConfigureAwait(false);
            }
            catch
            {
                this.Exit();
            }
        }
Example #10
0
 private void OnAppUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
 {
 }
Example #11
0
 private async void AppUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
 {
     e.Handled = true;
     await new MessageDialog("An unhandled error has occurred. Please try again! " + e.Exception.Message).ShowAsync();
 }
Example #12
0
        //        public override void OnFileActivated(
        //  FileActivatedEventArgs args
        //)
        //        {

        //        }

        void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
        {
            try
            {
                if (e != null && e.Exception != null)
                {
                    Exception exception = e.Exception;

                    Analytics.TrackEvent("Error", new Dictionary <string, string> {
                        { "ExceptionType", e.Exception.ToString() },
                        { "ExceptionMessage", e.Exception.Message }
                    });


                    if ((exception is System.Xml.XmlException || exception is NullReferenceException) && exception.ToString().ToUpper().Contains("INNERACTIVE"))
                    {
                        System.Diagnostics.Debug.WriteLine("Handled Inneractive exception {0}", exception);
                        e.Handled = true;
                        return;
                    }
                    else if ((exception is NullReferenceException || exception is System.IO.FileNotFoundException) && exception.ToString().ToUpper().Contains("SOMA"))
                    {
                        System.Diagnostics.Debug.WriteLine("Handled Smaato null reference exception {0}", exception);
                        e.Handled = true;
                        return;
                    }
                    else if ((exception is System.IO.IOException || exception is NullReferenceException) && exception.ToString().ToUpper().Contains("GOOGLE"))
                    {
                        System.Diagnostics.Debug.WriteLine("Handled Google exception {0}", exception);
                        e.Handled = true;
                        return;
                    }
                    else if (exception is ObjectDisposedException && exception.ToString().ToUpper().Contains("MOBFOX"))
                    {
                        System.Diagnostics.Debug.WriteLine("Handled Mobfox exception {0}", exception);
                        e.Handled = true;
                        return;
                    }
                    else if ((exception is NullReferenceException) && exception.ToString().ToUpper().Contains("MICROSOFT.ADVERTISING"))
                    {
                        System.Diagnostics.Debug.WriteLine("Handled Microsoft.Advertising exception {0}", exception);
                        e.Handled = true;
                        return;
                    }
                }
            }
            catch (Exception)
            {
            }

            //if (System.Diagnostics.Debugger.IsAttached)
            //{
            //    // An unhandled exception has occurred; break into the debugger
            //    System.Diagnostics.Debugger.Break();
            //}
            //else
            //{
            try
            {
                nowhereman.LittleWatson.instance.ReportException(e.Exception, "UniversalKeepTheRhythm");
            }
            catch { }

            //}
        }
 void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs args)
 {
     var error = args.Exception;
 }
Example #14
0
 private void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
 {
     Container.Resolve <MetricsService>().TrackException(e.Exception);
     e.Handled = true;
 }
Example #15
0
 public static void Current_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
 {
     LogException("Unhandled exception.", e.Exception);
     Flush();
 }