TTErrorChannel class
The one door every failure goes through.
An app raises a failure by calling capture; the channel validates it, hands it to the TTErrorSink to be kept and — when it matters to other devices — emitted to the mesh, and puts it on stream so whatever is watching (a diagnostics screen) sees it at once. Reading failures BACK off the mesh is a separate concern: a reader decodes TTErrorSignal and folds with foldErrorSignals; it does not go through here.
Capture is on the failure path, so it never throws for a reason of its own: a sink that fails is swallowed (the signal still reaches the stream), and the only thing that can raise is the caller handing in a signal that is not one — which is a programming error, caught in tests, not at runtime.
Constructors
- TTErrorChannel({TTErrorSink sink = const TTNullErrorSink()})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
TTErrorSignal> -
Every signal captured on this node, as it is captured. Broadcast, so more
than one screen can watch, and late — a subscriber sees signals from the
moment it subscribes, not the ones already gone by.
no setter
Methods
-
capture(
TTErrorSignal signal) → Future< TTErrorSignal> -
Records
signaland surfaces it. Returns the same signal so a caller can build-and-capture in one expression. -
dispose(
) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited