2013-03-04 4 views
1

Exception 클래스는 발생 된 예외에 대한 자세한 내용을 자세히 설명하는 많은 속성을 제공합니다.예외를 throw하는 클래스 명을 가져옵니다

InnerException-->Gets Exception instance that caused the current exception.

Public property -->TargetSite Gets the method that throws the current exception.

하지만 때로는 어떤 이해가되지 않습니다

StackTrace -->Gets a string representation of immediate frames on the call stack.

Source--> Gets or sets the name of application or object that causes the error.

Message-->Gets a message that describes 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()  

이 경우 예외를 유발하는 행 번호 나 클래스 이름을 알 수 없습니다.

이렇게 예외를 일으키는 클래스 이름을 찾는 방법.

답변

0

질문에 약간의 공백을 넣으십시오.

  1. 어디에서 예외가 있습니까? 사용자 지정 코드 또는 워크 플로가 SP 디자이너입니까?

  2. JafraWFTest.JafraCustomWFActivity 코드 또는 일부 제 3 자입니까?

  3. 어디에서 로그를 가져 오나요, 14 Hive \ Logs?

그래서 예외를 발생시킨 클래스 이름을 찾는 방법.

예외를 발생시키는 클래스는 JafraWFTest.JafraCustomWFActivity입니다. 이는 사용자 정의 워크 플로 작업입니다. 예외가 실행되면 예외가 throw됩니다. <Execute>b__0() 이것은 JafraWFTest.JafraCustomWFActivityExecute 방법으로 워크 플로 작업에 대한 일반 인터페이스를 구현한다는 것을 의미합니다.

따라서 JafraWFTest.JafraCustomWFActivity 코드가 네임 스페이스와 Execute 메서드에서 JafraCustomWFActivity 클래스를 찾으십시오. 제 3 자 코드 인 경우. 응용 프로그램 BIN 디렉토리 또는 GAC에서 JafraWFTest 어셈블리 (dll)를 찾으십시오. 그리고 다른 하나는 코드 케이스와 같아야합니다.

코드 시맨틱에서 사용자 지정 워크 플로 작업을위한 테스트라고 가정합니다. JafraWFTest 어셈블리가 GAC에 설치되어 있는지 테스트하고 테스트 환경 (사이트, 목록, 목록 항목)이 올바르게 구성되었는지 확인하십시오.

관련 문제