recordCapturedError function

void recordCapturedError(
  1. Object error,
  2. StackTrace? stackTrace
)

Public production entry point into the single error chokepoint.

Routes error / stackTrace through the private _recordErrorSafe (the re-entrancy guard + cross-surface dedup + redaction + pre-attach buffering), keeping _recordErrorSafe itself private. Used by the guarded zone's onError (DreamicErrorHandling.runGuarded / DreamicErrorHandling.recordZoneError) and by the conditional-import web-JS handler module, so every Dart-side capture surface funnels through the one chokepoint (ERH-001 / BEH-1, BEH-9).

Non-throwing (the chokepoint swallows its own failures).

Implementation

void recordCapturedError(Object error, StackTrace? stackTrace) {
  _recordErrorSafe(error, stackTrace);
}