【发布时间】:2013-01-29 15:14:29
【问题描述】:
每个人都熟悉 ASP.NET 的默认错误处理程序。黄色框包含 Source Error(发生错误的 5 行代码)和 Source File(文件名和行号),如下所示:
Source Error:
Line 48: public ActionResult TriggerException()
Line 49: {
Line 50: throw new SystemException("This is a generated exception to test the global error handler.");
Line 51: }
Line 52:
Source File: c:\MyApp\Controllers\TestToolsController.cs Line: 50
我正在构建一个自定义错误处理程序并希望获得这些相同的信息,但它们不包含在异常对象中。有谁知道我如何找回这些物品。
【问题讨论】:
标签: asp.net exception-handling