Exception类提供了如此多的属性,这些属性将提供更多含义引发异常的全部细节。获取抛出异常的类名称
InnerException-->Gets Exception instance that caused the current exception
。
Message-->Gets a message that describes the current exception.
Source--> Gets or sets the name of application or object that causes the error.
StackTrace -->Gets a string representation of immediate frames on the call stack.
Public property -->TargetSite Gets the method that throws the current exception.
但有时它没有任何意义。
at Microsoft.SharePoint.SPList.GetItemById(String strId, Int32 id, String strRootFolder, Boolean cacheRowsetAndId, String strViewFields, Boolean bDatesInUtc)
at Microsoft.SharePoint.SPList.GetItemById(Int32 id)
at JafraWFTest.JafraCustomWFActivity.<Execute>b__0()
在这种情况下,我不知道任何东西,行号或类名称是造成异常。
so 如何找到导致异常的类名。