1
我想实现一个全局异常处理程序,当下面一行产生一个错误,它只是停止在调试器中出现问题。全局异常处理程序WPF
var list = await _repository.GetAllAsync<ContactView>();
Application.Current.DispatcherUnhandledException +=
new DispatcherUnhandledExceptionEventHandler(MainThreadExceptionHandler);
AppDomain.CurrentDomain.UnhandledException +=
new UnhandledExceptionEventHandler(DomainExceptionHandler);