用 Application.SetUnhandledExceptionMode Method , 分别对应 Automatic Route all exceptions to the ThreadException handler, unless the application's configuration file specifies otherwise. CatchException Always route exceptions to the ThreadException handler. Ignore the application configuration file. ThrowException Never route exceptions to the ThreadException handler. Ignore the application configuration file.
因为Golbal里面有个Error,
当程序发生错误的时候自动运行这里,我可以在这里统一控制,
请问在Winform application 如何控制呢
谢谢
像Gobal那样 自动获得
谢谢
分别对应
Automatic Route all exceptions to the ThreadException handler, unless the application's configuration file specifies otherwise.
CatchException Always route exceptions to the ThreadException handler. Ignore the application configuration file.
ThrowException Never route exceptions to the ThreadException handler. Ignore the application configuration file.
try catch(){此处用自定义的函数}
在bs里有这样一个页,只要函数里发生了错误,而没有加try catch{} 错误会自动跑到Global.asax的这个函数里,
请问 在winform里有这样的功能吗?