Assumes.Fail Method

Definition

Overloads

Fail(String)

Throws an public exception.

Fail(String, Exception)

Throws an public exception.

Fail(String)

Throws an public exception.

[System.Diagnostics.DebuggerStepThrough]
public static Exception Fail (string? message = default);
[<System.Diagnostics.DebuggerStepThrough>]
static member Fail : string -> Exception
Public Shared Function Fail (Optional message As String = Nothing) As Exception

Parameters

message
String

Returns

Nothing, as this method always throws. The signature allows for "throwing" Fail so C# knows execution will stop.

Attributes

Applies to

Fail(String, Exception)

Throws an public exception.

public:
 static Exception ^ Fail(System::String ^ message, Exception ^ innerException);
public static Exception Fail (string? message, Exception? innerException);
static member Fail : string * Exception -> Exception
Public Shared Function Fail (message As String, innerException As Exception) As Exception

Parameters

message
String
innerException
Exception

Returns

Nothing, as this method always throws. The signature allows for "throwing" Fail so C# knows execution will stop.

Applies to