Compartir a través de


IVsUIShell.ReportErrorInfo(Int32) Method

Definition

Helper method that displays an error message to the user.

public:
 int ReportErrorInfo(int hr);
public:
 int ReportErrorInfo(int hr);
int ReportErrorInfo(int hr);
public int ReportErrorInfo (int hr);
abstract member ReportErrorInfo : int -> int
Public Function ReportErrorInfo (hr As Integer) As Integer

Parameters

hr
Int32

[in] Error message to display.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIShell::ReportErrorInfo(  
   [in] HRESULT hr  
);  

This method is generally called by the environment to report any error objects passed to it from a VSPackage. Any VSPackage can use this method internal to its own implementation, but most failures in a VSPackage are propagated to the environment to report.

The message to be displayed should be previously stashed away by a call to the Win32 SetErrorInfo API (or a call to the helper method SetErrorInfo). If the HRESULT is a standard system error code and there is no specific error message set aside through a call to SetErrorInfo, then the standard system error message is displayed.

Applies to