Share via


IUIService.ShowError 메서드

정의

지정한 오류 메시지를 메시지 상자에 표시합니다.

오버로드

ShowError(Exception)

지정한 예외와 이 예외에 대한 정보를 메시지 상자에 표시합니다.

ShowError(String)

지정한 오류 메시지를 메시지 상자에 표시합니다.

ShowError(Exception, String)

지정한 예외와 이 예외에 대한 정보를 메시지 상자에 표시합니다.

ShowError(Exception)

지정한 예외와 이 예외에 대한 정보를 메시지 상자에 표시합니다.

public:
 void ShowError(Exception ^ ex);
public void ShowError (Exception ex);
abstract member ShowError : Exception -> unit
Public Sub ShowError (ex As Exception)

매개 변수

ex
Exception

표시할 Exception입니다.

설명

이 메서드를 사용하면 메시지 상자 표시를 개발 환경과 제대로 통합할 수 있습니다.

적용 대상

ShowError(String)

지정한 오류 메시지를 메시지 상자에 표시합니다.

public:
 void ShowError(System::String ^ message);
public void ShowError (string message);
abstract member ShowError : string -> unit
Public Sub ShowError (message As String)

매개 변수

message
String

표시할 오류 메시지입니다.

설명

이 메서드를 사용하면 메시지 상자 표시를 개발 환경과 제대로 통합할 수 있습니다.

적용 대상

ShowError(Exception, String)

지정한 예외와 이 예외에 대한 정보를 메시지 상자에 표시합니다.

public:
 void ShowError(Exception ^ ex, System::String ^ message);
public void ShowError (Exception ex, string message);
abstract member ShowError : Exception * string -> unit
Public Sub ShowError (ex As Exception, message As String)

매개 변수

ex
Exception

표시할 Exception입니다.

message
String

예외에 대한 정보를 제공하는 표시할 메시지입니다.

예제

다음 코드 예제에서는 인스턴스 IUIService 를 가져오고 서비스의 ShowError 메서드를 호출하려고 합니다.

IUIService^ UIservice = dynamic_cast<IUIService^>(this->GetService( System::Windows::Forms::Design::IUIService::typeid ));
if ( UIservice != nullptr )
      UIservice->ShowError( gcnew Exception( "This is a message in a test exception, displayed by the IUIService",gcnew ArgumentException( "Test inner exception" ) ) );
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowError( new Exception(
        "This is a message in a test exception, " + 
        "displayed by the IUIService", 
         new ArgumentException("Test inner exception")));
Dim UIservice As IUIService = CType(Me.GetService( _
    GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If (UIservice IsNot Nothing) Then
    UIservice.ShowError(New Exception( _
        "This is a message in a test exception, displayed by the IUIService", _
        New ArgumentException("Test inner exception")))
End If

설명

이 메서드를 사용하면 메시지 상자 표시를 개발 환경과 제대로 통합할 수 있습니다.

적용 대상