Helper method that displays an error message to the user.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
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.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.