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.
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.Booleantrue if fault message was successfully created; otherwise, false. The default is false.
| Exception | Condition |
|---|---|
| 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.