ThrowHelper.ThrowCOMException Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ThrowCOMException(String, Exception) |
Throws a new COMException. |
ThrowCOMException(String, Int32) |
Throws a new COMException. |
ThrowCOMException() |
Throws a new COMException. |
ThrowCOMException(String) |
Throws a new COMException. |
ThrowCOMException<T>(String, Int32) |
Throws a new COMException. |
ThrowCOMException<T>(String, Exception) |
Throws a new COMException. |
ThrowCOMException<T>(String) |
Throws a new COMException. |
ThrowCOMException<T>() |
Throws a new COMException. |
ThrowCOMException(String, Exception)
Throws a new COMException.
public static void ThrowCOMException (string? message, Exception? innerException);
static member ThrowCOMException : string * Exception -> unit
Public Shared Sub ThrowCOMException (message As String, innerException As Exception)
Parameters
- message
- String
The argument name.
Exceptions
Thrown with the specified parameters.
Applies to
ThrowCOMException(String, Int32)
Throws a new COMException.
public static void ThrowCOMException (string? message, int error);
static member ThrowCOMException : string * int -> unit
Public Shared Sub ThrowCOMException (message As String, error As Integer)
Parameters
- message
- String
The argument name.
- error
- Int32
The HRESULT of the errror to include.
Exceptions
Thrown with the specified parameters.
Applies to
ThrowCOMException()
Throws a new COMException.
public static void ThrowCOMException ();
static member ThrowCOMException : unit -> unit
Public Shared Sub ThrowCOMException ()
Exceptions
Thrown with no paarameters.
Applies to
ThrowCOMException(String)
Throws a new COMException.
public static void ThrowCOMException (string? message);
static member ThrowCOMException : string -> unit
Public Shared Sub ThrowCOMException (message As String)
Parameters
- message
- String
The message to include in the exception.
Exceptions
Thrown with the specified parameter.
Applies to
ThrowCOMException<T>(String, Int32)
Throws a new COMException.
public static T ThrowCOMException<T> (string? message, int error);
static member ThrowCOMException : string * int -> 'T
Public Shared Function ThrowCOMException(Of T) (message As String, error As Integer) As T
Type Parameters
- T
The type of expected result.
Parameters
- message
- String
The argument name.
- error
- Int32
The HRESULT of the errror to include.
Returns
This method always throws, so it actually never returns a value.
Exceptions
Thrown with the specified parameters.
Applies to
ThrowCOMException<T>(String, Exception)
Throws a new COMException.
public static T ThrowCOMException<T> (string? message, Exception? innerException);
static member ThrowCOMException : string * Exception -> 'T
Public Shared Function ThrowCOMException(Of T) (message As String, innerException As Exception) As T
Type Parameters
- T
The type of expected result.
Parameters
- message
- String
The argument name.
Returns
This method always throws, so it actually never returns a value.
Exceptions
Thrown with the specified parameters.
Applies to
ThrowCOMException<T>(String)
Throws a new COMException.
public static T ThrowCOMException<T> (string? message);
static member ThrowCOMException : string -> 'T
Public Shared Function ThrowCOMException(Of T) (message As String) As T
Type Parameters
- T
The type of expected result.
Parameters
- message
- String
The message to include in the exception.
Returns
This method always throws, so it actually never returns a value.
Exceptions
Thrown with the specified parameter.
Applies to
ThrowCOMException<T>()
Throws a new COMException.
public static T ThrowCOMException<T> ();
static member ThrowCOMException : unit -> 'T
Public Shared Function ThrowCOMException(Of T) () As T
Type Parameters
- T
The type of expected result.
Returns
This method always throws, so it actually never returns a value.
Exceptions
Thrown with no parameters.