var ex = HttpContext.Features.Get<IExceptionHandlerFeature>();. 接著只要透過 ex.Error 就可以取得完整的例外物件。 完整範例如下:
確定! 回上一頁