Skip to content

Function: createReportGuard()

API / @xmachines/play-actor / createReportGuard

function createReportGuard(messages): ReportGuard;

Defined in: packages/play-actor/src/failure-latch.ts:134

Makes a ReportGuard.

The flag SAVES and restores, and it is no plain false at the end: a handler of the host can start a second contained failure inside the first — a fallback that throws, a write of the store that drives another emission — and a bare reset in the inner finally would clear the guard while the outer report still runs.

Parameters

ParameterTypeDescription
messagesReportGuardMessagesSee ReportGuardMessages. The two messages say what the guard writes to console.error, and the absence of one says what it lets through.

Returns

ReportGuard