2

Windowsワークフロー基盤で、ThrowActivityにカスタムエラーメッセージをスローすることは可能ですか?

例えば。私のWFでこの例外をスローしたいと想像してください:-

CutomException("This is my custom error message", myNumber, myObect);

乾杯 :)

4

2 に答える 2

3

あなたの質問をよく理解していないかもしれませんが、アクティビティを実行する前に、のFaultプロパティを使用して特定の例外を設定できます。例:ThrowActivity

throwActivity1.Fault = new CustomException("This is my custom error message", myNumber, myObect);
于 2008-11-13T15:02:40.500 に答える
1

このようにして、任意のカスタム例外をスローできます。

public DiscontinuedProductException stoppedProductException1 = 新しい DiscontinuedProductException();

[SerializableAttribute()] public class DiscontinuedProductException : Exception { public DiscontinuedProductException() : base() { }

    public DiscontinuedProductException(string message)
        : base(message)
    {
    }

    public DiscontinuedProductException(string message, Exception innerException)
        : base(message, innerException)
    {
    }

    protected DiscontinuedProductException(SerializationInfo info, StreamingContext context)
        : base(info, context)
    {
    }
}
于 2008-12-13T02:34:04.780 に答える