在 WPF(.net) 中,我可以使用以下代码来处理意外异常并正确退出我的程序。
private void Application_Startup(object sender, StartupEventArgs e) {
this.DispatcherUnhandledException += App_DispatcherUnhandledException
}
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) {
// handle unhandled exception
}
VCL中是否也有类似的东西?甚至在标准 C++ 中?