在.NET 1.1未处理的异常处理异常、未处理、NET

由网友(有勇气就会有奇迹)分享简介:我保持了 .NET 1.1 应用程序,和我一直在负责的是确保用户不会看到任何不友好的错误通知的事情之一I'm maintaining a .NET 1.1 application, and one of the things I've been tasked with is making sure the user...

我保持了 .NET 1.1 应用程序,和我一直在负责的是确保用户不会看到任何不友好的错误通知的事情之一

I'm maintaining a .NET 1.1 application, and one of the things I've been tasked with is making sure the user doesn't see any unfriendly error notifications.

我添加了处理程序 Application.ThreadException AppDomain.CurrentDomain.UnhandledException ,这也被调用。我的问题是,仍显示标准 CLR 错误对话框(异常处理程序被调用之前)。

I've added handlers to Application.ThreadException and AppDomain.CurrentDomain.UnhandledException, which do get called. My problem is that the standard CLR error dialog is still displayed (before the exception handler is called).

杰夫谈到了他的博客上这里和的此处。但是,有没有解决方案。那么,什么是标准的方式 .NET 1.1 来处理未捕获的异常,并显示一个友好的对话框?

Jeff talks about this problem on his blog here and here. But there's no solution. So what is the standard way in .NET 1.1 to handle uncaught exceptions and display a friendly dialog box?

修改:杰夫的反应是标记为正确的答案,因为他提供的链接有关于如何做什么所需的最完整的信息

Edit: Jeff's response was marked as the correct answer, because the link he provided has the most complete information on how to do what's required.

推荐答案

呵呵,WinForms的你绝对应该能够得到它的工作。你要注意的唯一的事情就是事情发生在不同的线程。

Oh, in WinForms you definitely should be able to get it to work. The only thing you have to watch out for is things happening on different threads.

我有一个旧的$ C $的CProject文章下面这应有助于:

I have an old CodeProject article here which should help:

http://www.$c$cproject.com/KB/exception/ExceptionHandling.aspx

阅读全文

相关推荐

最新文章