FaultConverter.TryCreateException Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Wraps OnTryCreateException with error checking.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
'Declaration Public Function TryCreateException ( _ message As Message, _ fault As MessageFault, _ <OutAttribute> ByRef exception As Exception _ ) As Boolean
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.Booleantrue if fault was successfully converted; otherwise, false. The default is false.
| Exception | Condition |
|---|---|
| ArgumentNullException | message or fault is Nothing. |
| ArgumentNullException | OnTryCreateException returned true, but exception is Nothing. |
| ArgumentNullException | OnTryCreateException returned false, but exception is not Nothing. |
OnTryCreateException is an abstract method that you must implement. The current method wraps several parameter error tests around a call to that method.
Show: