Class LatencyException
- Namespace
- Cuemon.Resilience
- Assembly
- Cuemon.Resilience.dll
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?.GetType().Name);
}
}
Constructors
LatencyException()
Initializes a new instance of the LatencyException class.
public LatencyException()
LatencyException(string)
Initializes a new instance of the LatencyException class.
public LatencyException(string message)
Parameters
messagestringThe message that describes the error.
LatencyException(string, Exception)
Initializes a new instance of the LatencyException class.
public LatencyException(string message, Exception innerException)