Use Application.Current.Dispatcher.Invoke to throw an exception