Språk

IUIService.ShowError Metod

Definition

Visar det angivna felmeddelandet i en meddelanderuta.

Överlagringar

Name Description
ShowError(Exception)

Visar det angivna undantaget och information om undantaget i en meddelanderuta.

ShowError(String)

Visar det angivna felmeddelandet i en meddelanderuta.

ShowError(Exception, String)

Visar det angivna undantaget och information om undantaget i en meddelanderuta.

ShowError(Exception)

Källa:
IUIService.cs
Källa:
IUIService.cs
Källa:
IUIService.cs
Källa:
IUIService.cs
Källa:
IUIService.cs

Visar det angivna undantaget och information om undantaget i en meddelanderuta.

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

Parametrar

ex
Exception

Som Exception ska visas.

Kommentarer

Med den här metoden kan meddelanderutans visning integreras korrekt med utvecklingsmiljön.

Gäller för

ShowError(String)

Källa:
IUIService.cs
Källa:
IUIService.cs
Källa:
IUIService.cs
Källa:
IUIService.cs
Källa:
IUIService.cs

Visar det angivna felmeddelandet i en meddelanderuta.

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

Parametrar

message
String

Felmeddelandet som ska visas.

Kommentarer

Med den här metoden kan meddelanderutans visning integreras korrekt med utvecklingsmiljön.

Gäller för

ShowError(Exception, String)

Källa:
IUIService.cs
Källa:
IUIService.cs
Källa:
IUIService.cs
Källa:
IUIService.cs
Källa:
IUIService.cs

Visar det angivna undantaget och information om undantaget i en meddelanderuta.

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)

Parametrar

ex
Exception

Som Exception ska visas.

message
String

Ett meddelande som ska visas som innehåller information om undantaget.

Exempel

Följande kodexempel försöker hämta en instans av IUIService och anropa tjänstens ShowError metod.

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

Kommentarer

Med den här metoden kan meddelanderutans visning integreras korrekt med utvecklingsmiljön.

Gäller för