Skip to content

describeFailureHandling

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/techdocs/control-flow-render.ts

How a component handles failure, reported as the mix it actually is.

Naming a single "dominant" behaviour was wrong twice over: it was computed from a capped sample rather than every handler, and on a tie it picked whichever came first in the file — which on a real service announced "discards failures silently" for a class whose handlers mostly log. A class that logs 32 failures and swallows 11 is doing both, and the silent ones are the part a reader needs, so they are always named rather than averaged away.

Signature

ts
function describeFailureHandling(actorName: string, counts: Record<string, number> | undefined): string | undefined

Parameters

NameType
actorNamestring
counts`Record<string, number>

Returns: string | undefined

Was this page helpful?

Download as PDF