Table of Contents

LatencyException Class

Definition

Namespace
Cuemon.Resilience
Assemblies
Cuemon.Resilience.dll
Source
src/Cuemon.Resilience/LatencyException.cs

The exception that is thrown when a latency related operation was taking to long to complete.

public class LatencyException : Exception, ISerializable
Inheritance
LatencyException
Implements
Inherited Members

Examples

The following example demonstrates how to wrap a timeout-related failure in a .

using System;
using Cuemon.Resilience;

namespace MyApp.Examples;

public static class LatencyExceptionExample
{
    public static void Demonstrate()
    {
        var timeout = new TimeoutException("The database query timed out after 10 seconds.");
        var exception = new LatencyException("Order processing exceeded the configured latency threshold.", timeout);

        Console.WriteLine(exception.Message);
        Console.WriteLine(exception.InnerException?.Message);
    }
}

Constructors

Name Description
LatencyException()

Initializes a new instance of the LatencyException class.

LatencyException(string)

Initializes a new instance of the LatencyException class.

LatencyException(string, Exception)

Initializes a new instance of the LatencyException class.