FaultConverter::TryCreateFaultMessage Method (Exception^, Message^%)

 

Wraps OnTryCreateFaultMessage with error checking.

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

public:
bool TryCreateFaultMessage(
	Exception^ exception,
	[OutAttribute] Message^% message
)

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.

Exception Condition
ArgumentNullException

OnTryCreateException returned true but message is null.

ArgumentNullException

OnTryCreateException returned false but message is not null.

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

.NET Framework
Available since 3.0
Return to top
Show: