TryCreateException Method
Collapse the table of content
Expand the table of content

FaultConverter.TryCreateException Method (Message, MessageFault, Exception)

 

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.

Exception Condition
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 class that you must implement. The current method wraps several parameter error tests around a call to that method.

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:
© 2016 Microsoft