.NET ez 2011-11-29
如果出現.NET Runtime 2.0 Error Reporting # 5000 就需要設定例外處理,才能夠抓取到Error資訊!
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(WorkerThreadHandler); public void WorkerThreadHandler(object sender, UnhandledExceptionEventArgs args) { if (!(args.ExceptionObject is ThreadAbortException)) { Exception exc = args.ExceptionObject as Exception; MessageBox.Show(exc.ToString()); } }
標籤: .NET
本文章網址:
https://www.ez2o.com/Blog/Post/csharp-.NET-Runtime-Error-UnhandledException
https://www.ez2o.com/Blog/Post/36
https://www.ez2o.com/Blog/Post/csharp-.NET-Runtime-Error-UnhandledException
https://www.ez2o.com/Blog/Post/36