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.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public:
static int ThrowOnFailure(
	int hr,
	... array<int>^ expectedHRFailure
)

Parameters

hr
Type: System::Int32

The HRESULT to test.

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.

Return to top
Show: