Skip to main content

Definition

Assembly: CloudNimble.Breakdance.DotHttp.dll Namespace: CloudNimble.Breakdance.DotHttp Inheritance: System.Exception

Syntax

CloudNimble.Breakdance.DotHttp.DotHttpAssertionException

Summary

Exception thrown when a DotHttp assertion fails.

Remarks

This exception is thrown by DotHttpAssertions methods when HTTP response validation fails.

Examples

try
{
    await DotHttpAssertions.AssertValidResponseAsync(response);
}
catch (DotHttpAssertionException ex)
{
    Console.WriteLine($"Assertion failed: {ex.Message}");
}

Constructors

.ctor

Initializes a new instance of the DotHttpAssertionException class.

Syntax

public DotHttpAssertionException()

.ctor

Initializes a new instance of the DotHttpAssertionException class with a specified error message.

Syntax

public DotHttpAssertionException(string message)

Parameters

NameTypeDescription
messagestringThe message that describes the error.

.ctor

Initializes a new instance of the DotHttpAssertionException class with a specified error message and inner exception.

Syntax

public DotHttpAssertionException(string message, System.Exception innerException)

Parameters

NameTypeDescription
messagestringThe message that describes the error.
innerExceptionSystem.ExceptionThe exception that is the cause of the current exception.