public UnhandledExceptionWindow(Exception exception)
        {
            Guard.IsNotNull(exception, nameof(exception));

            DataContext = new UnhandledExceptionViewModel(exception);
            InitializeComponent();
        }
Example #2
0
        private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
        {
            e.Handled = true;

            var vm = new UnhandledExceptionViewModel(e.Exception);

            DialogProvider.ProvideView(vm);

            var excep = e.Exception;

            while (excep != null)
            {
                Trace.TraceError("Unhandeled exception occoured: {0}", e.Exception);
                excep = excep.InnerException;
            }
        }