Esempio n. 1
0
        /// <summary>
        /// metodo que resuelve el msg a mostrar para ex no manejadas
        /// </summary>
        /// <param name="o"></param>
        public static void HandleUnhandledException(Object o)
        {
            string    error;
            Exception ex = o as Exception;

            if (ex != null)
            {
                error = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex);
            }
            else
            {
                error = o.ToString();
            }

            System.Text.StringBuilder sb = new System.Text.StringBuilder(5000);
            sb.Append(@"Se detectaron anomalias en la aplicacion por favor chequee los siguientes errores: ");
            sb.Append(Environment.NewLine);
            sb.Append(Environment.NewLine);
            sb.Append(@"{0}");
            sb.Append(Environment.NewLine);
            sb.Append("Desea salir de la aplicacion ?");
            error = string.Format(sb.ToString(), error);
            Fwk.Bases.FrontEnd.Controls.FwkExceptionViewComponent wExceptionViewer = new Fwk.Bases.FrontEnd.Controls.FwkExceptionViewComponent();
            wExceptionViewer.Title = "";
            DialogResult result = wExceptionViewer.Show("", error, string.Empty);

            if (result == DialogResult.OK)
            {
                Application.Exit();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// metodo que resuelve el msg a mostrar para ex no manejadas
        /// </summary>
        /// <param name="o"></param>
        public static void HandleUnhandledException(Object o)
        {
            string error;
            Exception ex = o as Exception;
            if (ex != null)
            {
                error = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex);
            }
            else
            {
                error = o.ToString();

            }

            System.Text.StringBuilder sb = new System.Text.StringBuilder(5000);
            sb.Append(@"Se detectaron anomalias en la aplicacion por favor chequee los siguientes errores: ");
            sb.Append(Environment.NewLine);
            sb.Append(Environment.NewLine);
            sb.Append(@"{0}");
            sb.Append(Environment.NewLine);
            sb.Append("Desea salir de la aplicacion ?");
            error = string.Format(sb.ToString(), error);
            Fwk.Bases.FrontEnd.Controls.FwkExceptionViewComponent wExceptionViewer = new Fwk.Bases.FrontEnd.Controls.FwkExceptionViewComponent();
             wExceptionViewer.Title = "";
            DialogResult result = wExceptionViewer.Show("",error, string.Empty);
            if (result == DialogResult.OK)
                Application.Exit();
        }