Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
“OnTaskFailed”和“OnError”事件有什么区别?
谢谢
任何错误都会引发 OnError 事件,而 OnTaskFailed 事件仅在任务失败时引发。虽然这两者可能经常一起发生,但在某些情况下它们不会。如果任务将其ForcedExecutionResult属性设置为 Completion/Success 或该MaximumErrorCount值高于发生的错误数,则这些事件不会重叠的一些示例。
ForcedExecutionResult
MaximumErrorCount