ThrowHelper.ThrowExternalException Method

Definition

Overloads

ThrowExternalException()

Throws a new ExternalException.

ThrowExternalException(String)

Throws a new ExternalException.

ThrowExternalException(String, Exception)

Throws a new ExternalException.

ThrowExternalException(String, Int32)

Throws a new ExternalException.

ThrowExternalException<T>()

Throws a new ExternalException.

ThrowExternalException<T>(String)

Throws a new ExternalException.

ThrowExternalException<T>(String, Exception)

Throws a new ExternalException.

ThrowExternalException<T>(String, Int32)

Throws a new ExternalException.

ThrowExternalException()

Throws a new ExternalException.

public static void ThrowExternalException ();
static member ThrowExternalException : unit -> unit
Public Shared Sub ThrowExternalException ()

Exceptions

Thrown with no parameters.

Applies to

ThrowExternalException(String)

Throws a new ExternalException.

public static void ThrowExternalException (string? message);
static member ThrowExternalException : string -> unit
Public Shared Sub ThrowExternalException (message As String)

Parameters

message
String

The message to include in the exception.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowExternalException(String, Exception)

Throws a new ExternalException.

public static void ThrowExternalException (string? message, Exception? innerException);
static member ThrowExternalException : string * Exception -> unit
Public Shared Sub ThrowExternalException (message As String, innerException As Exception)

Parameters

message
String

The argument name.

innerException
Exception

The inner Exception to include.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowExternalException(String, Int32)

Throws a new ExternalException.

public static void ThrowExternalException (string? message, int error);
static member ThrowExternalException : string * int -> unit
Public Shared Sub ThrowExternalException (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

ThrowExternalException<T>()

Throws a new ExternalException.

public static T ThrowExternalException<T> ();
static member ThrowExternalException : unit -> 'T
Public Shared Function ThrowExternalException(Of T) () As T

Type Parameters

T

The type of expected result.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with no parameters.

Applies to

ThrowExternalException<T>(String)

Throws a new ExternalException.

public static T ThrowExternalException<T> (string? message);
static member ThrowExternalException : string -> 'T
Public Shared Function ThrowExternalException(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

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowExternalException<T>(String, Exception)

Throws a new ExternalException.

public static T ThrowExternalException<T> (string? message, Exception? innerException);
static member ThrowExternalException : string * Exception -> 'T
Public Shared Function ThrowExternalException(Of T) (message As String, innerException As Exception) As T

Type Parameters

T

The type of expected result.

Parameters

message
String

The argument name.

innerException
Exception

The inner Exception to include.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowExternalException<T>(String, Int32)

Throws a new ExternalException.

public static T ThrowExternalException<T> (string? message, int error);
static member ThrowExternalException : string * int -> 'T
Public Shared Function ThrowExternalException(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

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameters.

Applies to