CreateFault Method (MessageFault, String, Type[])
Collapse the table of content
Expand the table of content

FaultException.CreateFault Method (MessageFault, String, Type())

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns a FaultException object from the specified message fault, action, and an array of detail types.

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

'Declaration
Public Shared Function CreateFault ( _
	messageFault As MessageFault, _
	action As String, _
	ParamArray faultDetailTypes As Type() _
) As FaultException

Parameters

messageFault
Type: System.ServiceModel.Channels.MessageFault
The message fault that contains default SOAP fault information.
action
Type: System.String
The fault action value.
faultDetailTypes
Type: System.Type ()
An array of types that contains fault details.

Return Value

Type: System.ServiceModel.FaultException
A FaultException object that you can throw to indicate that a SOAP fault message was received.

The faultDetailTypes parameter contains candidate detail types. If any of the faultDetailTypes has a schema that matches the messageFault parameter, a System.ServiceModel.FaultException(Of TDetail) is returned where the type parameter is the matching candidate type.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft