Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
Public Shared Function ThrowOnFailure ( _
hr As Integer, _
ParamArray expectedHRFailure As Integer() _
) As Integer
public static int ThrowOnFailure(
int hr,
params int[] expectedHRFailure
)
public:
static int ThrowOnFailure(
int hr,
... array<int>^ expectedHRFailure
)
static member ThrowOnFailure :
hr:int *
expectedHRFailure:int[] -> int
public static function ThrowOnFailure(
hr : int,
... expectedHRFailure : int[]
) : int
Parameters
hr
Type: Int32The HRESULT to test.
expectedHRFailure
Type: array<Int32[]If hr is found in this array of expected failures no exception should be thrown.
Return Value
Type: Int32
The HRESULT.
.NET Framework Security
- 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.
See Also
Reference
Microsoft.VisualStudio Namespace