Unhandled Exception Handler in .NET 1.1

后端 未结 5 1949
闹比i
闹比i 2020-12-11 00:15

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.

I\'ve a

5条回答
  •  醉梦人生
    2020-12-11 00:41

    It's a Windows Forms application. The exceptions that are caught by Application.ThreadException work fine, and I don't get the ugly .NET exception box (OK to terminate, Cancel to debug? who came up with that??).

    I was getting some exceptions that weren't being caught by that and ended up going to the AppDomain.UnhandledException event that were causing problems. I think I've caught most of those exceptions, and I am displaying them in our nice error box now.

    So I'll just have to hope there are not some other circumstances that would cause exceptions to not be caught by the Application.ThreadException handler.

提交回复
热议问题