Skip to content

Documentation / @debuffjp/dev / ExplainedError

Interface: ExplainedError ​

Defined in: dev/src/explain.ts:24

A runtime error explained for humans and agents. JSON-serialisable.

Properties ​

count ​

count: number

Defined in: dev/src/explain.ts:37

How many times this same error happened.


hint ​

hint: string

Defined in: dev/src/explain.ts:31

A plain-words next step.


kind ​

kind: ErrorKind

Defined in: dev/src/explain.ts:25


message ​

message: string

Defined in: dev/src/explain.ts:27


name ​

name: string

Defined in: dev/src/explain.ts:26


phase? ​

optional phase?: string

Defined in: dev/src/explain.ts:33

Loop phase and tick, when the game loop caught it.


reportUrl? ​

optional reportUrl?: string

Defined in: dev/src/explain.ts:40

For debuff-bug: a prefilled GitHub issue.


scene? ​

optional scene?: string

Defined in: dev/src/explain.ts:34


signature? ​

optional signature?: string

Defined in: dev/src/explain.ts:46

For debuff-bug: the error name and the debuff functions it was thrown from, without line numbers, the message or any path in the game (TypeError at spryte.js:Canvas2D.flush). The same bug gives the same signature in every game, so debuff dev can report it as an automatic papercut.


stack ​

stack: string

Defined in: dev/src/explain.ts:38


tick? ​

optional tick?: number

Defined in: dev/src/explain.ts:35


where? ​

optional where?: SourceLocation

Defined in: dev/src/explain.ts:29

Where in the game's code to look: the throwing frame, or the call into debuff that failed.