TrackingWorkflowExceptionEventArgs.OriginalActivityPath Propriedade

Definição

Obtém o QualifiedName da atividade que originalmente gerou a exceção.Gets the QualifiedName of the activity that originally threw the exception.

public:
 property System::String ^ OriginalActivityPath { System::String ^ get(); };
public string OriginalActivityPath { get; }
member this.OriginalActivityPath : string
Public ReadOnly Property OriginalActivityPath As String

Valor da propriedade

String

A QualifiedName da atividade que originalmente lançou a exceção.The QualifiedName of the activity that originally threw the exception.

Exemplos

O exemplo de código a seguir demonstra um método, chamado WriteExceptionEventArgs , que captura um TrackingWorkflowExceptionEventArgs .The following code example demonstrates a method, named WriteExceptionEventArgs, which captures a TrackingWorkflowExceptionEventArgs. O código verifica se a Exception propriedade é null ( Nothing em Visual Basic).The code checks whether the Exception property is null (Nothing in Visual Basic). Se não estiver, o código gravará a mensagem associada à Exception propriedade no console.If it is not, the code writes the message associated with the Exception property to the console. Se Exception for null ( Nothing ), o código converterá o valor da OriginalActivityPath propriedade em uma cadeia de caracteres e a gravará no console.If Exception is null (Nothing), the code converts the value of the OriginalActivityPath property to a string and writes it to the console.

Este exemplo de código faz parte do exemplo de SDK de acompanhamento de EventArgs do arquivo Program. cs.This code example is part of the EventArgs Tracking SDK Sample from the Program.cs file. Para obter mais informações, consulte exemplo de acompanhamento de EventArgs.For more information, see EventArgs Tracking Sample.

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

Comentários

As exceções são transmitidas à cadeia de atividades do manipulador de exceção.Exceptions are passed up the chain of exception handler activities. Um manipulador de exceção pode optar por gerar uma exceção novamente.An exception handler may choose to throw an exception again. Quando um manipulador de exceção gera uma exceção novamente, um novo evento de acompanhamento de exceção contendo um novo TrackingWorkflowExceptionEventArgs é gerado para a infraestrutura de acompanhamento do tempo de execução.When an exception handler throws an exception again, a new exception tracking event containing a new TrackingWorkflowExceptionEventArgs is raised to the runtime tracking infrastructure. OriginalActivityPath refere-se à atividade que originalmente lançou a exceção.OriginalActivityPath refers to the activity that originally threw the exception.

Aplica-se a