FaultConverter::OnTryCreateException Method (Message^, MessageFault^, Exception^%)
.NET Framework (current version)
Tries to create the exception.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
protected: virtual bool OnTryCreateException( Message^ message, MessageFault^ fault, [OutAttribute] Exception^% exception ) abstract
Parameters
- message
-
Type:
System.ServiceModel.Channels::Message^
The fault message.
- fault
-
Type:
System.ServiceModel.Channels::MessageFault^
The fault.
- exception
-
Type:
System::Exception^%
If conversion is successful, the SOAP exception, returned as an out parameter.
Return Value
Type: System::Booleantrue if fault was successfully converted; otherwise, false. The default is false.
For a channel layer to implement GetProperty<FaultConverter> to support converting fault messages to SOAP exceptions, override this method to create an exception by doing the following steps:
Inspect the fault message.
If recognized, do the appropriate conversion.
If not recognized, convert it by a call to GetProperty<FaultConverter> on the inner channel.
Transport channels should delegate to GetDefaultFaultConverter to get the default SOAP/WS-Addressing fault converter.
Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Show: