FaultConverter::TryCreateException Method (Message^, MessageFault^, Exception^%)
.NET Framework (current version)
Wraps OnTryCreateException with error checking.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public: bool TryCreateException( Message^ message, MessageFault^ fault, [OutAttribute] 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::Booleantrue 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
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
Show: