NtsError class sealed
Failure surface for ntsQuery and ntsWarmCookies.
Sealed: every concrete instance is one of the eight variants
declared below, and exhaustive switch (err) { ... } on an
NtsError value is checked at compile time. Implements Exception
so try { ... } on NtsError catch (err) and try { ... } on Exception catch (err) both bind it.
Constructors
- NtsError.authentication({required String message, TrustBackend? trustBackend})
-
AEAD seal/open failed (tag mismatch, malformed input).
constfactory
- NtsError.internal({required String message})
-
Bug guard for unreachable internal states.
constfactory
- NtsError.invalidSpec({required String message})
-
specwas rejected before any I/O happened.constfactory - NtsError.keProtocol({required String message, TrustBackend? trustBackend})
-
TLS handshake or NTS-KE record exchange failed. See
NtsError.network for
trustBackendsemantics.constfactory - NtsError.network({required String message, TrustBackend? trustBackend})
-
TCP/UDP I/O error or connection failure.
trustBackendcarries the per-handshake trust-anchor backend resolved before the failure fired (when the failure happened post-build_tls_config), ornullwhen the failure pre-dated config construction.constfactory - NtsError.noCookies({TrustBackend? trustBackend})
-
Cookie jar empty after a handshake (server delivered none).
Always post-handshake, so
trustBackendis populated when the caller cares to inspect which backend authenticated the chain that produced the empty pool.constfactory - NtsError.ntpProtocol({required String message, TrustBackend? trustBackend})
-
NTPv4 packet parsing or extension validation failed. See
NtsError.network for
trustBackendsemantics.constfactory - NtsError.timeout({required TimeoutPhase phase, TrustBackend? trustBackend})
-
Wall-clock budget elapsed inside one of the call's pre-NTP or NTP
phases. The TimeoutPhase payload identifies which phase tripped
the deadline so callers can choose the right remediation.
constfactory
-
Caller selected
TrustMode.platformOnlyand the platform trust-anchor backend could not be constructed. Surfaced instead of silently downgrading to thewebpki-rootsstatic bundle. The payload carries the underlying construction-failure diagnostic. New in 3.0.0; consumers using exhaustiveswitch (err) { ... }onNtsErrormust add an arm for this variant.constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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