Freigeben über


DiscoveryExceptionDictionary.Add-Methode

Fügt dem DiscoveryExceptionDictionary eine Exception mit einem Schlüssel von url hinzu.

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

Syntax

'Declaration
Public Sub Add ( _
    url As String, _
    value As Exception _
)
'Usage
Dim instance As DiscoveryExceptionDictionary
Dim url As String
Dim value As Exception

instance.Add(url, value)
public void Add (
    string url,
    Exception value
)
public:
void Add (
    String^ url, 
    Exception^ value
)
public void Add (
    String url, 
    Exception value
)
public function Add (
    url : String, 
    value : Exception
)

Parameter

  • url
    Der URL, der während der Ausführung des XML Web Services Discovery-Tools das Auslösen einer Ausnahme bewirkt hat.
  • value
    Die Exception, die während der Ausführung des XML Web Services Discovery-Tools aufgetreten ist.

Ausnahmen

Ausnahmetyp Bedingung

ArgumentNullException

url ist NULL (Nothing in Visual Basic).

ArgumentException

Ein Eintrag mit einem Schlüssel von url ist bereits in der DiscoveryExceptionDictionary enthalten.

Beispiel

Dim myNewExceptionDictionary As New DiscoveryExceptionDictionary()
' Add an exception with the custom error message.
Dim myNewException As New 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;
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;

Plattformen

Windows 98, Windows 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

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

DiscoveryExceptionDictionary-Klasse
DiscoveryExceptionDictionary-Member
System.Web.Services.Discovery-Namespace
Add