<分区>
Possible Duplicate:
.NET - What’s the best way to implement a “catch all exceptions handler”
我有一个 .NET 控制台应用程序崩溃并向用户显示一条消息。
我所有的代码都在 try{<code>} catch(Exception e){<stuff>}
中 block ,但偶尔仍会显示错误。
在 Win32 应用程序中,您可以通过安装各种异常处理程序来捕获所有可能的异常/崩溃:
/* C++ exc handlers */
_set_se_translator
SetUnhandledExceptionFilter
_set_purecall_handler
set_terminate
set_unexpected
_set_invalid_parameter_handler
在 .NET 世界中有什么等价物可以让我处理/记录/安静所有可能的错误情况?