WorkflowServiceAttributes.IncludeExceptionDetailInFaults 属性
定义
获取或设置一个值,该值指定是否要将常规未处理执行异常转换为 FaultException 类型的 ExceptionDetail 并将其作为错误消息发送。Gets or sets a value that specifies that general unhandled execution exceptions are to be converted into a FaultException of type ExceptionDetail and sent as a fault message. 仅在开发阶段将其设置为 true 以便对服务进行故障排除。Set this to true only during development to troubleshoot a service.
public:
property bool IncludeExceptionDetailInFaults { bool get(); void set(bool value); };
public bool IncludeExceptionDetailInFaults { get; set; }
member this.IncludeExceptionDetailInFaults : bool with get, set
Public Property IncludeExceptionDetailInFaults As Boolean
属性值
如果未经处理的异常将作为 SOAP 错误返回,则为 true;否则为 false。true if unhandled exceptions are to be returned as SOAP faults; otherwise, false.
示例
下面的示例演示如何访问 IncludeExceptionDetailInFaults 属性。The following example demonstrates how to access the IncludeExceptionDetailInFaults property.
WorkflowServiceAttributes attributes = new WorkflowServiceAttributes();
attributes.IncludeExceptionDetailInFaults = true;
Dim attributes As New WorkflowServiceAttributes()
attributes.IncludeExceptionDetailInFaults = True
注解
默认值是 false。The default value is false.