Show / Hide Table of Contents

Class ConnectionSupersededException

The operation was overtaken by a later one, which now owns the connection.

Inheritance
object
Exception
SystemException
OperationCanceledException
ConnectionSupersededException
Namespace: Xrpl.Client.Exceptions
Assembly: Xrpl.dll
Syntax
public class ConnectionSupersededException : OperationCanceledException
Remarks

A transition of the connection has one owner. An operation that finds the connection has moved on stands down and reports this instead of returning success from a server the client is no longer on. The same is reported to a request that was in flight when a transition swept it.

It derives from System.OperationCanceledException because that is what these paths have always thrown, so no existing catch and no task status changes. Two consequences are worth knowing:

  • awaited directly, this exception - and therefore Kind - reaches the caller. Through Task.WhenAll it also reaches the caller, as long as none of the combined tasks faulted. If one did, WhenAll records the faults only and drops the cancellation: the supersession is then absent from the await and from Task.Exception alike. Await the operation itself when the outcome matters.
  • System.OperationCanceledException.CancellationToken is CancellationToken.None: nobody cancelled anything, so a filter of the form when (ex.CancellationToken == myToken) does not match here.

Constructors

| Edit this page View Source

ConnectionSupersededException(string, ConnectionTransitionKind, string?)

Declaration
public ConnectionSupersededException(string message, ConnectionTransitionKind kind, string? supersededBy = null)
Parameters
Type Name Description
string message
ConnectionTransitionKind kind
string supersededBy

Properties

| Edit this page View Source

Kind

What kind of operation took the connection over.

Declaration
public ConnectionTransitionKind Kind { get; }
Property Value
Type Description
ConnectionTransitionKind
| Edit this page View Source

SupersededBy

Where the operation that took over left the client, when that is known; otherwise null.

Declaration
public string? SupersededBy { get; }
Property Value
Type Description
string

Extension Methods

XrplErrorClassifier.Classify(Exception)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX