FaultException.CreateFault Method (MessageFault, 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 and an array of detail types.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
'Declaration Public Shared Function CreateFault ( _ messageFault As MessageFault, _ ParamArray faultDetailTypes As Type() _ ) As FaultException
Parameters
- messageFault
- Type: System.ServiceModel.Channels.MessageFault
The message fault that contains default SOAP fault information.
- faultDetailTypes
- Type:
System.Type
()
An array of types that contains fault details.
Return Value
Type: System.ServiceModel.FaultExceptionA 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.