ErrorHandler.ThrowOnFailure 方法 (Int32, array<Int32 )

确定该参数是否成功或失败 HRESULT 并引发异常,如果它位于不包含已知的失败的错误。

命名空间:  Microsoft.VisualStudio
程序集:  Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)

语法

声明
Public Shared Function ThrowOnFailure ( _
    hr As Integer, _
    ParamArray expectedHRFailure As Integer() _
) As Integer
public static int ThrowOnFailure(
    int hr,
    params int[] expectedHRFailure
)

参数

  • expectedHRFailure
    类型:array<System.Int32[]
    如果 hr 在中找到预期的失败不应引发异常。

返回值

类型:System.Int32
HRESULT。

.NET Framework 安全性

请参见

参考

ErrorHandler 类

ThrowOnFailure 重载

Microsoft.VisualStudio 命名空间

其他资源

在托管代码的 HRESULT 信息