DiscoveryExceptionDictionary.Add(String, Exception) Method

Definition

Adds an Exception with a key of url to the DiscoveryExceptionDictionary.

C#
public void Add(string url, Exception value);

Parameters

url
String

The URL that caused an exception during XML Web services discovery.

value
Exception

The Exception that occurred during XML Web services discovery.

Exceptions

url is null.

An entry with a key of url already exists in the DiscoveryExceptionDictionary.

Examples

C#
DiscoveryExceptionDictionary myNewExceptionDictionary =
                           new DiscoveryExceptionDictionary();
// Add an exception with the custom error message.
Exception myNewException =
     new Exception("The requested service is not available.");
myNewExceptionDictionary.Add(myUrlKey, myNewException);
myExceptionDictionary = myNewExceptionDictionary;

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also