Public, backend-agnostic entry points for dreamic's error-capture surfaces (ERH-001).
The internal chokepoint (_recordErrorSafe) stays private; this facade is
the public production surface a consumer main() wires up:
- runGuarded — the lifelong, outermost
runZonedGuardedwrap aroundrunApp(BEH-1). - recordZoneError — the public record entry the zone's
onError(and the web-JS handlers) route through. - installEarlyWebErrorHandlers — the apply-once web
windowJS-error listener install (no-op on VM/mobile via the conditional import).
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
Static Methods
-
installEarlyWebErrorHandlers(
) → void -
Installs the apply-once web
window'error'/'unhandledrejection'listeners (the sole web capture surface under Path A′). No-op on VM/mobile via the conditional import. The consumermain()calls this at boot-step-3 only under Path A′ (kWebDartCapture— Phase 6). -
recordZoneError(
Object error, StackTrace stackTrace) → void -
Public production entry into the single error chokepoint, used by the
guarded zone's
onError(ERH-001). Forwards into the private_recordErrorSafe(re-entrancy guard + cross-surface dedup + redaction + pre-attach buffering). Non-throwing. -
runGuarded(
void body(), [void onError(Object error, StackTrace stackTrace)?]) → void -
Wraps
body(typically() => runApp(...)) in a lifelong, outermostrunZonedGuardedso EVERY uncaught async error in the app surfaces throughonError— which should forward to recordZoneError (ERH-001 / BEH-1). -
simulateWebError(
Object error, StackTrace? stack) → void -
Test-only seam (ERH-009): routes a synthesized web error through the
chokepoint exactly as a real
windowJS-error handler would, bypassingwindow, so the routing is unit-testable on the VM. On VM/mobile this resolves the stub (which also routes through the chokepoint); on web it resolves the web library's copy.