Skip to content

Class: TermwrightError

@termwright/driver


@termwright/driver / TermwrightError

Defined in: driver/src/errors.ts:19

Base class for every error the driver throws. Carries a stable code plus Playwright-grade diagnostics (what was observed, which candidates existed, and a suggestion).

  • Error

new TermwrightError(code, message, diagnostics): TermwrightError

Defined in: driver/src/errors.ts:24

TermwrightErrorCode

string

ErrorDiagnostics

TermwrightError

Error.constructor

optional actionability?: ActionabilityExplanation

Defined in: driver/src/errors.ts:22


readonly code: TermwrightErrorCode

Defined in: driver/src/errors.ts:20


readonly diagnostics: ErrorDiagnostics

Defined in: driver/src/errors.ts:21

toString(): string

Defined in: driver/src/errors.ts:38

Renders message + diagnostics the way test runners print failures.

string


withActionability(explanation): this

Defined in: driver/src/errors.ts:32

Attach the exact failed planner evaluation; never recomputed after state changes.

ActionabilityExplanation

this