在.NET 1.1未处理的异常处理 [英] Unhandled Exception Handler in .NET 1.1

查看:152
本文介绍了在.NET 1.1未处理的异常处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我保持了 .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:

<一个href="http://www.$c$cproject.com/KB/exception/ExceptionHandling.aspx">http://www.$c$cproject.com/KB/exception/ExceptionHandling.aspx

这篇关于在.NET 1.1未处理的异常处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆