Esempio n. 1
0
        /// <summary>
        /// Dispatcher ExceptionFilter handler
        /// will mark as handled and log to event log
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public static void Dispatcher_UnhandledExceptionFilter(object sender, System.Windows.Threading.DispatcherUnhandledExceptionFilterEventArgs e)
        {
            string errorString = "Dispatcher_UnhandledExceptionFilter ";

            try
            {
                errorString += e.Exception.ToString();
                FluidTrade.Core.EventLog.Error("{0}", errorString);
            }
            catch
            {
                //log failed do not throw
            }
            System.Diagnostics.Debug.WriteLine("{0}", errorString);

            e.RequestCatch = ShouldMarkExceptionHandled();
        }
Esempio n. 2
0
 private void Dispatcher_UnhandledExceptionFilter(object sender, System.Windows.Threading.DispatcherUnhandledExceptionFilterEventArgs e)
 {
     e.RequestCatch = true;
 }
Esempio n. 3
0
 private void Dispatcher_UnhandledExceptionFilter(object sender, System.Windows.Threading.DispatcherUnhandledExceptionFilterEventArgs e)
 {
     LogError("Dispatcher_UnhandledExceptionFilter", e.Exception);
 }
Esempio n. 4
0
 private void DispatcherUnhandledExceptionFilter(object sender, System.Windows.Threading.DispatcherUnhandledExceptionFilterEventArgs e)
 {
     ShowMessageAndLeave(e);
     Container.Resolve <ILoggerFacade>().Log($"{e.Exception.ToString()}\n{e.Exception.StackTrace}", Category.Exception, Priority.High);
 }