Share via


WSTrustServiceContract.HandleException 方法

定义

引发 RequestFailed 事件,如果需要,将指定的异常转换为 FaultException。 如果原始异常是 FaultException,或者,如果 PreserveOriginalException 标志设置为 true,则不执行转换为 FaultException

protected:
 virtual bool HandleException(Exception ^ ex, System::String ^ trustNamespace, System::String ^ action, System::ServiceModel::EnvelopeVersion ^ requestEnvelopeVersion);
protected virtual bool HandleException (Exception ex, string trustNamespace, string action, System.ServiceModel.EnvelopeVersion requestEnvelopeVersion);
abstract member HandleException : Exception * string * string * System.ServiceModel.EnvelopeVersion -> bool
override this.HandleException : Exception * string * string * System.ServiceModel.EnvelopeVersion -> bool
Protected Overridable Function HandleException (ex As Exception, trustNamespace As String, action As String, requestEnvelopeVersion As EnvelopeVersion) As Boolean

参数

ex
Exception

原始异常。

trustNamespace
String

当前的 WS-Trust 版本的命名空间。

action
String

导致异常的 WS-Trust 操作。

requestEnvelopeVersion
EnvelopeVersion

请求信封的 SOAP 版本。

返回

返回 Boolean。 如果引发原始异常,则为 false

适用于