Compartir a través de


ErrorHandler.ThrowOnFailure Method (Int32)

Determines whether the parameter is a success or failure HRESULT and throws an exception in case of failure.

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

Syntax

'Declaration
Public Shared Function ThrowOnFailure ( _
    hr As Integer _
) As Integer
public static int ThrowOnFailure(
    int hr
)
public:
static int ThrowOnFailure(
    int hr
)
static member ThrowOnFailure : 
        hr:int -> int
public static function ThrowOnFailure(
    hr : int
) : int

Parameters

  • hr
    Type: Int32

    The HRESULT to test.

Return Value

Type: Int32
The HRESULT.

.NET Framework Security

See Also

Reference

ErrorHandler Class

ThrowOnFailure Overload

Microsoft.VisualStudio Namespace

Other Resources

HRESULT Information in Managed Code