DiscoveryExceptionDictionary.Add Method

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
)
public void Add (
	String url, 
	Exception value
)
public function Add (
	url : String, 
	value : Exception
)
Not applicable.

Parameters

url

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

value

The Exception that occurred during XML Web services discovery.

Exception typeCondition

ArgumentNullException

url is a null reference (Nothing in Visual Basic).

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;

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;

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: