EngineError
error.ts:14 Extends Error
Engine-thrown error carrying a machine-readable ErrorCode and an
optional context bag of values relevant to the failure (the offending
host, key, component type, etc.). Every fault originating inside the
arcade2d engine surfaces as an EngineError — instanceof EngineError
is the supported way to filter engine faults from unrelated thrown
values in user try/catch blocks.
Construct via throwEngineError rather than throw new EngineError(...) so the throw site is uniform across the codebase.
Constructors
constructor(code: ErrorCode, message: string, context?: Record<string, unknown>): EngineError Parameters
-
codeErrorCode -
messagestring -
context?Record<string, unknown>
Properties
readonly #
context?: Record<string, unknown>