Exemplo n.º 1
0
        private void App_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            try
            {
                var logService = Container.Resolve <ILogService>();
                logService.LogException(e.Exception);

#if !DEBUG
                YandexMetrica.ReportUnhandledException(e.Exception);
#endif
                var locService           = Container.Resolve <ILocService>();
                var notificationsService = Container.Resolve <IAppNotificationsService>();
                notificationsService.SendNotification(new AppNotification
                {
                    Title               = locService["AppNotifications_FatalError_Title"],
                    Content             = locService["AppNotifications_TouchToInfo_Content"],
                    Type                = AppNotificationType.Error,
                    DestinationView     = "ErrorView",
                    NavigationParameter = e.Message,
                    IsImportant         = true
                });
            }
            catch { }

            e.Handled = true;
        }
Exemplo n.º 2
0
        public static void Fatal(Exception ex, string message)
        {
            Debug.WriteLine("Fatal error: " + message + "\r\n" + ex);

            YandexMetrica.ReportUnhandledException(ex);

            HockeyClient.Current.TrackException(ex);

            _logger.Fatal(message, ex);
        }
Exemplo n.º 3
0
        public static void Fatal(Exception ex, string message)
        {
            Debug.WriteLine("Fatal error: " + message + "\r\n" + ex);

            YandexMetrica.ReportUnhandledException(ex);
            Telemetry.TrackException(ex);
#if DEBUG
            _logger.Fatal(message, ex);
#endif
        }