DiscoveryExceptionDictionary::Add Method (String^, Exception^)
.NET Framework (current version)
Adds an Exception with a key of url to the DiscoveryExceptionDictionary.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- url
-
Type:
System::String^
The URL that caused an exception during XML Web services discovery.
- value
-
Type:
System::Exception^
The Exception that occurred during XML Web services discovery.
| Exception | Condition |
|---|---|
| ArgumentNullException | url is null. |
| ArgumentException | An entry with a key of url already exists in the DiscoveryExceptionDictionary. |
DiscoveryExceptionDictionary^ myNewExceptionDictionary = gcnew DiscoveryExceptionDictionary; // Add an exception with the custom error message. Exception^ myNewException = gcnew Exception( "The requested service is not available." ); myNewExceptionDictionary->Add( myUrlKey, myNewException ); myExceptionDictionary = myNewExceptionDictionary;
.NET Framework
Available since 1.1
Available since 1.1
Show: