ערוך

שתף באמצעות


FaultConverter.TryCreateException(Message, MessageFault, Exception) Method

Definition

public:
 bool TryCreateException(System::ServiceModel::Channels::Message ^ message, System::ServiceModel::Channels::MessageFault ^ fault, [Runtime::InteropServices::Out] Exception ^ % exception);
public bool TryCreateException (System.ServiceModel.Channels.Message message, System.ServiceModel.Channels.MessageFault fault, out Exception exception);
member this.TryCreateException : System.ServiceModel.Channels.Message * System.ServiceModel.Channels.MessageFault * Exception -> bool
Public Function TryCreateException (message As Message, fault As MessageFault, ByRef exception As Exception) As Boolean

Parameters

message
Message

The fault message.

fault
MessageFault

The fault.

exception
Exception

If conversion is successful, the SOAP exception, returned as an out parameter.

Returns

true if fault was successfully converted; otherwise, false. The default is false.

Exceptions

message or fault is null.

-or-

OnTryCreateException(Message, MessageFault, Exception) returned true but exception is null.

-or-

OnTryCreateException(Message, MessageFault, Exception) returned false but exception is not null.

Remarks

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

Applies to