C# 未通过等待任务或访问任务的 Exception 属性观察到任务的异常。因此,终结器线程重新引发了未观察到的异常
Task.Factory.StartNew(() => { //Task 任务 }).ContinueWith(t => { var aggException = t.Exception.Flatten(); foreach (var exception in aggException.InnerExceptions) { //输出错误 exception } }, TaskContinuationOptions.OnlyOnFaulted);

浙公网安备 33010602011771号