語言

WSTrustServiceContract.HandleException 方法

定義

若有需要,會提出 RequestFailed 事件並將指定的例外轉換成 a FaultException 。 若原始例外為 a FaultException ,或 PreserveOriginalException 旗標設 true為 ,則不會執行轉換為 a 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 如果原始例外被拋出。

適用於