DiscoveryExceptionDictionary.Add(String, Exception) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Fügt eine Exception mit einem Schlüssel der url .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)
Parameter
- url
- String
Die URL, die während der XML-Webdienstermittlung eine Ausnahme verursacht hat.
Ausnahmen
url ist null.
Ein Eintrag mit einem Schlüssel ist url bereits in der DiscoveryExceptionDictionaryDatei vorhanden.
Beispiele
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