다음을 통해 공유


FaultConverter.OnTryCreateFaultMessage Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

When implemented in a derived class, tries to create the fault message after the fault has been converted to a SOAP exception.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Protected MustOverride Function OnTryCreateFaultMessage ( _
    exception As Exception, _
    <OutAttribute> ByRef message As Message _
) As Boolean
protected abstract bool OnTryCreateFaultMessage(
    Exception exception,
    out Message message
)

Parameters

Return Value

Type: System.Boolean
true if fault message was successfully created; otherwise, false. The default is false.

Exceptions

Exception Condition
ArgumentNullException

OnTryCreateException returned true but message is nulla null reference (Nothing in Visual Basic).

Remarks

Channels that support fault conversion implement GetProperty<FaultConverter> and override this method to do the following. If a layer can convert the exception, it does; otherwise, it calls GetProperty<FaultConverter> on its inner channel. Transport channels should delegate to GetDefaultFaultConverter to get the default SOAP/WS-Addressing fault converter.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.