Exemplo n.º 1
0
 private void onNavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     //نمایش خطا به یوزر
     new SendMsg().ShowMsg(new AlertConfirmBoxModel
     {
         ErrorTitle  = "خطای نمایش صفحه",
         Errors      = ExceptionLogger.GetExceptionMessages(e.Exception),
         ShowCancel  = Visibility.Collapsed,
         ShowConfirm = Visibility.Visible
     }, e.Exception);
     e.Handled = true;
 }
Exemplo n.º 2
0
        private static void appDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
        {
            new SendMsg().ShowMsg(
                new AlertConfirmBoxModel
            {
                ErrorTitle  = "خطای عمومی:",
                Errors      = ExceptionLogger.GetExceptionMessages(e.Exception),
                ShowCancel  = Visibility.Collapsed,
                ShowConfirm = Visibility.Visible
            }, e.Exception);

            e.Handled = true;
        }
Exemplo n.º 3
0
        static void currentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            //این نوع خطاها عموما موارد مدیریت نشده در تردها هستند که بهتر است برنامه اینجا تمام شود
            var exception = (Exception)e.ExceptionObject;

            new SendMsg().ShowMsg(
                new AlertConfirmBoxModel
            {
                ErrorTitle  = "خطای مدیریت نشده:",
                Errors      = ExceptionLogger.GetExceptionMessages(exception),
                ShowCancel  = Visibility.Collapsed,
                ShowConfirm = Visibility.Visible
            }, exception);
        }