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.WhenAllit also reaches the caller, as long as none of the combined tasks faulted. If one did,WhenAllrecords the faults only and drops the cancellation: the supersession is then absent from theawaitand fromTask.Exceptionalike. 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 SourceConnectionSupersededException(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 SourceKind
What kind of operation took the connection over.
Declaration
public ConnectionTransitionKind Kind { get; }
Property Value
| Type | Description |
|---|---|
| ConnectionTransitionKind |
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 |