Share via


DiscoveryExceptionDictionary.Add(String, Exception) 메서드

정의

url 키를 가진 ExceptionDiscoveryExceptionDictionary에 추가합니다.

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 Web services를 검색하는 동안 예외를 발생시킨 URL입니다.

value
Exception

XML Web services를 검색하는 동안 발생한 Exception입니다.

예외

url이(가) null인 경우

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

적용 대상

추가 정보