FaultConverter.TryCreateException Method

Wraps OnTryCreateException with error checking.

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

public bool TryCreateException(
	Message message,
	MessageFault fault,
	out Exception exception
)

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.

ExceptionCondition
ArgumentNullException

message or fault is null.

ArgumentNullException

OnTryCreateException returned true, but exception is null.

ArgumentNullException

OnTryCreateException returned false, but exception is not null.

OnTryCreateException is an abstract method that you must implement. The current method wraps several parameter error tests around a call to that method.

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

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

Community Additions

ADD
Show: