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.
我创建了一个自定义任务数据流任务。但是当任务失败时,我会开火。
ComponentMetaData.FireError(99, ComponentMetaData.Name, "General Exception: " + ex.Message, string.Empty, 0, out bout);
控制流中的数据流任务确实显示为红色。但是在 Dataflow 中,自定义任务仍然显示为绿色,即使它遇到了错误。我如何使自定义任务也显示为红色。
谢谢
好吧,看来我找到了解决方案。
当您捕获异常然后执行 Componentmetadata.Firerror 时,系统不再认为存在问题。它假定您已修复它。
你需要重新抛出一个异常 throw new Exception("Something Bad Happend");
然后整个过程停止,任务显示为红色。看起来 FireError 只是在执行结果选项卡中显示数据,它实际上并没有做任何事情。