开发者

what information can be gleaned from Model.Exception in .net mvc

开发者 https://www.devze.com 2023-04-05 17:50 出处:网络
I\'m currently using Model.Exception.Message but wondering if there are other properties that will provide other information.What I\'d like to know is the page on which the exception was thrown if

I'm currently using

Model.Exception.Message

but wondering if there are other properties that will provide other information. What I'd like to know is the page on which the exception was thrown if th开发者_StackOverflowat's at all possible to determine what function was happening when the exception occurred.

Edit (adding more information):

I'm using this on a cshtml page in .net mvc. I know there are exception handler libraries that will do everything for me, but I'd like to know what I can leverage out of this dynamic expression.


Since you don't provide enough details only a general pointer that the Exception class in .NET provides several properties including a Stacktrace - so: yes, you can get more information than just the Message... for the MSDN reference see http://msdn.microsoft.com/en-us/library/system.exception.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号