DiscoveryExceptionDictionary.Add(String, Exception) 메서드

정의

Exceptionurl 와 함께 추가합니다 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)

매개 변수

url
String

XML 웹 서비스를 검색하는 동안 예외를 발생시킨 URL입니다.

value
Exception

Exception XML 웹 서비스를 검색하는 동안 발생한 작업입니다.

예외

urlnull입니다.

키가 url 있는 항목이 이미 있습니다 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;
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

적용 대상

추가 정보