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

查看:89
本文介绍了.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).

Jeff在他的博客上谈到这个问题这里这里。但是没有解决办法。那么.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?

Jeff的回答被标记为正确的答案,因为链接他提供了有关如何做所需要的最完整的信息。

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.

推荐答案

哦,在Windows窗体中,你绝对应该能够它工作。唯一需要注意的是不同线程上发生的事情。

Oh, in Windows Forms 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.

我有一个旧的Code Project文章,这应该有助于:

I have an old Code Project article here which should help:

用户友好异常处理

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

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