DiscoveryExceptionDictionary.Add(String, Exception) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Voegt een Exception met een sleutel toe url aan de DiscoveryExceptionDictionary.
public:
void Add(System::String ^ url, Exception ^ value);
public void Add(string url, Exception value);
member this.Add : string * Exception -> unit
Public Sub Add (url As String, value As Exception)
Parameters
- url
- String
De URL die een uitzondering heeft veroorzaakt tijdens de detectie van XML-webservices.
Uitzonderingen
url is null.
Er bestaat al een vermelding met een sleutel url in de DiscoveryExceptionDictionary.
Voorbeelden
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;
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