DiscoveryExceptionDictionary.Add(String, Exception) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an Exception with a key of url
to the 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
The URL that caused an exception during XML Web services discovery.
Exceptions
url
is null
.
An entry with a key of url
already exists in the DiscoveryExceptionDictionary.
Examples
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
Applies to
See also
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.