IUIService.ShowError 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.
Displays the specified error message in a message box.
Overloads
ShowError(Exception) |
Displays the specified exception and information about the exception in a message box. |
ShowError(String) |
Displays the specified error message in a message box. |
ShowError(Exception, String) |
Displays the specified exception and information about the exception in a message box. |
ShowError(Exception)
Displays the specified exception and information about the exception in a message box.
public:
void ShowError(Exception ^ ex);
public void ShowError (Exception ex);
abstract member ShowError : Exception -> unit
Public Sub ShowError (ex As Exception)
Parameters
Remarks
Using this method enables the message box display to be properly integrated with the development environment.
Applies to
ShowError(String)
Displays the specified error message in a message box.
public:
void ShowError(System::String ^ message);
public void ShowError (string message);
abstract member ShowError : string -> unit
Public Sub ShowError (message As String)
Parameters
- message
- String
The error message to display.
Remarks
Using this method enables the message box display to be properly integrated with the development environment.
Applies to
ShowError(Exception, String)
Displays the specified exception and information about the exception in a message box.
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)
Parameters
- message
- String
A message to display that provides information about the exception.
Examples
The following code example attempts to obtain an instance of the IUIService and invoke the service's ShowError method.
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
Remarks
Using this method enables the message box display to be properly integrated with the development environment.
Applies to
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示