IVsUIShell.ReportErrorInfo Method (Int32)
Helper method that displays an error message to the user.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Parameters
- hr
-
Type:
System.Int32
[in] Error message to display.
Return Value
Type: System.Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.