Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FaultConverter::OnTryCreateException Method (Message^, MessageFault^, Exception^%)

 

Tries to create the exception.

Namespace:   System.ServiceModel.Channels
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::Boolean

true 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
Return to top
Show:
© 2017 Microsoft