1. 程式人生 > >擷取所有的winform runtime error

擷取所有的winform runtime error

https://stackify.com/csharp-catch-all-exceptions/
AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) =>
{
    Debug.WriteLine(eventArgs.Exception.ToString());
};

可以用來收集客戶端的報錯資訊。