OnTryCreateFaultMessage Method
Collapse the table of content
Expand the table of content

FaultConverter.OnTryCreateFaultMessage Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)

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

Parameters

exception
Type: System.Exception
The SOAP exception.
message
Type: System.ServiceModel.Channels.Message %
The fault message returned as an out parameter.

Return Value

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

ExceptionCondition
ArgumentNullException

OnTryCreateException returned true but message is Nothing.

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft