TrackingWorkflowExceptionEventArgs.Exception 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
워크플로 인스턴스가 throw하는 Exception을 가져옵니다.
public:
property Exception ^ Exception { Exception ^ get(); };
public Exception Exception { get; }
member this.Exception : Exception
Public ReadOnly Property Exception As Exception
속성 값
워크플로 인스턴스가 throw하는 예외입니다.
예제
다음 코드 예제에서는 WriteExceptionEventArgs를 캡처하는 TrackingWorkflowExceptionEventArgs라는 메서드를 보여 줍니다. 이 코드에서는 Exception 속성이 null (Visual Basic의 경우 Nothing)인지 여부를 확인합니다. 그렇지 않으면 코드에서는 Exception 속성과 연결된 메시지를 콘솔에 씁니다. Exception이 null(Nothing)이면 코드에서 OriginalActivityPath 속성의 값을 문자열로 변환하고 콘솔에 씁니다.
이 코드 예제는 Program.cs 파일에 있는 EventArgs Tracking SDK 샘플의 일부입니다. 자세한 내용은 EventArgs Tracking 샘플합니다.
static void WriteExceptionEventArgs(string eventDescription, TrackingWorkflowExceptionEventArgs exceptionEventArgs, DateTime eventDataTime)
{
Console.WriteLine("\nException Event Arguments Read From Tracking Database:\n");
Console.WriteLine("EventDataTime: " + eventDataTime.ToString());
Console.WriteLine("EventDescription: " + eventDescription);
if (null != exceptionEventArgs.Exception)
{
Console.WriteLine("ExceptionEventArgs Exception Message: " + exceptionEventArgs.Exception.Message.ToString());
}
Console.WriteLine("ExceptionEventArgs Original Activity Path: " + exceptionEventArgs.OriginalActivityPath.ToString());
}
Shared Sub WriteExceptionEventArgs(ByVal eventDescription As String, ByVal exceptionEventArgs As TrackingWorkflowExceptionEventArgs, ByVal eventDataTime As DateTime)
Console.WriteLine(vbCrLf + "Exception Event Arguments Read From Tracking Database:")
Console.WriteLine("EventDataTime: " + eventDataTime.ToString(CultureInfo.CurrentCulture))
Console.WriteLine("EventDescription: " + eventDescription)
If exceptionEventArgs.Exception IsNot Nothing Then
Console.WriteLine("ExceptionEventArgs Exception Message: " + exceptionEventArgs.Exception.Message.ToString())
End If
Console.WriteLine("ExceptionEventArgs Original Activity Path: " + exceptionEventArgs.OriginalActivityPath.ToString())
End Sub