为什么 BizTalk Scope 没有捕捉到这个 MissingPropertyException
Why didn't BizTalk Scope Catch this MissingPropertyException
与这个问题非常相似:Handling Exceptions in Biztalk which don't get caught by Scope shape,但却是一个完全不同的错误。
我正在创建一个关于如何在 BizTalk 中捕获错误的教程,结果发现它根本没有捕获我的错误。我刚刚展示了如何使用提升的字段,所以我删除了一个没有提升的元素的文件。如果我在 "Do XPaths" 表达式的顶部放置一个除以零( x = x / x where x =0),那么它会很好。
所以我知道错误的原因,以及如何解决它。但我在问为什么 scope/catch 没有捕捉到它。
错误:
Shape name: Do XPaths ShapeId: 3c3c7019-6322-4fe8-85eb-3292601c6039
Exception thrown from: segment 2, progress 2
Inner exception: There is no value associated with the property 'SchemaLesson.Airline' in the
message.
Exception type: MissingPropertyException
Source: Microsoft.XLANGs.BizTalk.Engine
Orch "Transaction Type" 是 "Long Running",我的 Scope 也是。我还尝试将 "Transaction Type" 设置为 "None",结果相同。
那是因为您捕获的是 System.SystemException
而不是 System.Exception
。 XLang 异常不是 System.SystemException
的成员,而是 System.Exception
的成员。 System.Exception
会钓到更多。
另见 System.Exception vs System.SystemException
与这个问题非常相似:Handling Exceptions in Biztalk which don't get caught by Scope shape,但却是一个完全不同的错误。
我正在创建一个关于如何在 BizTalk 中捕获错误的教程,结果发现它根本没有捕获我的错误。我刚刚展示了如何使用提升的字段,所以我删除了一个没有提升的元素的文件。如果我在 "Do XPaths" 表达式的顶部放置一个除以零( x = x / x where x =0),那么它会很好。
所以我知道错误的原因,以及如何解决它。但我在问为什么 scope/catch 没有捕捉到它。
错误:
Shape name: Do XPaths ShapeId: 3c3c7019-6322-4fe8-85eb-3292601c6039
Exception thrown from: segment 2, progress 2
Inner exception: There is no value associated with the property 'SchemaLesson.Airline' in the
message.
Exception type: MissingPropertyException
Source: Microsoft.XLANGs.BizTalk.Engine
Orch "Transaction Type" 是 "Long Running",我的 Scope 也是。我还尝试将 "Transaction Type" 设置为 "None",结果相同。
那是因为您捕获的是 System.SystemException
而不是 System.Exception
。 XLang 异常不是 System.SystemException
的成员,而是 System.Exception
的成员。 System.Exception
会钓到更多。
另见 System.Exception vs System.SystemException