DiscoveryExceptionDictionary::Add Method (String^, Exception^)

 

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

Namespace:   System.Web.Services.Discovery
Assembly:  System.Web.Services (in System.Web.Services.dll)

public:
void Add(
	String^ url,
	Exception^ value
)

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
Return to top
Show: