다음을 통해 공유


ErrorHandler.ThrowOnFailure Method (Int32, array<Int32 )

Determines whether the parameter is a success or failure HRESULT and throws an exception if it is a failure that is not included in the array of well-known failures.

Namespace:  Microsoft.VisualStudio
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

‘선언
Public Shared Function ThrowOnFailure ( _
    hr As Integer, _
    ParamArray expectedHRFailure As Integer() _
) As Integer
public static int ThrowOnFailure(
    int hr,
    params int[] expectedHRFailure
)

Parameters

  • expectedHRFailure
    Type: array<System.Int32[]
    If hr is found in this array of expected failures no exception should be thrown.

Return Value

Type: System.Int32
The HRESULT.

.NET Framework Security

See Also

Reference

ErrorHandler Class

ThrowOnFailure Overload

Microsoft.VisualStudio Namespace

Other Resources

HRESULT Information in Managed Code