我有一个运行 WPF 的庞大应用程序,我偶尔会得到 p>
The operation completed successfully
随机错误,可能是一大堆事情。
有什么方法可以捕获此代码并重新启动应用程序。
我已经在用了
#region "Error Checking"
void OnAppDomainUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
HandleError("OnAppDomainUnhandledException", e.ExceptionObject.ToString(), e.ExceptionObject.ToString());
}
void OnDispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
string error = string.Empty;
if (e.Exception.InnerException != null)
error = e.Exception.InnerException.Message;
HandleError("OnDispatcherUnhandledException", e.Exception.Message.ToString(),error);
e.Handled = true;
}
#endregion
但这似乎没有捕获/处理错误
最佳答案
关于c# - 处理 "The operation completed successfully"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8891924/