ReadonlybridgeThe bridge the sync factory tried to resolve a handle for, or undefined
when NOTHING was preloaded and no bridge was pinned.
undefined is the common case rather than the exotic one, and it used to
be spelled with a '<none-preloaded>' sentinel BridgeId. That sentinel
was not a bridge: it was published on this field, interpolated into the
copy-paste remedy below, and the remedy it produced —
await preloadCauslWasm({ bridge: '<none-preloaded>' }) — REJECTS, with a
different error (CAUSL_WASM_ENGINE_UNAVAILABLE, "the consolidated bridge
artefact could not be read or compiled: .../wasm/pkg/%3Cnone-preloaded%3E/
causl_engine_bridge_bg.wasm"), sending the reader into artefact-vendoring
and wasmBaseUrl diagnostics when the correct fix was a bare
await preloadCauslWasm(). An error whose remedy costs a debugging cycle
before it is distrusted is worse than one that offers none.
So the absence is now modelled as an absence. A caller branching on
error.bridge must handle undefined; that is the honest shape, and the
sentinel never named a bridge anyone could preload.
Optional ReadonlycauseThe underlying resolution failure, if any.
ReadonlycodeOptionalstackStaticstackThe Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
StaticcaptureCreates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
OptionalconstructorOpt: FunctionStaticprepare
§18A.12 — thrown when NOTHING has been preloaded for the resolved bridge.
A synchronous factory MUST NOT silently await: a wasm-authoritative graph and a TS graph differ in
read()-identity / commit-clock (§15.1), so a silent swap is a glitch-freedom hazard. Rather than block on an unresolved promise mid-render, the factory throws this clear, actionable error naming the remedy (preloadCauslWasm()) and the bridge — preserving the §18A loud-fail discipline.Subclass of the WasmEngineUnavailableError family; branch on
error.code === 'CAUSL_WASM_NOT_PRELOADED'.#280 — TWO factories now raise it, so the message takes the CALL SITE as a parameter.
createCausl()reaches this subpath through the main-bundle registry slot, and telling that caller to "passcreateCauslWasmSync(undefined, …)" would name a factory they did not call and an option that no longer exists. The class and thecodeare deliberately NOT varied with it: a second class carryingCAUSL_WASM_NOT_PRELOADEDwould breakinstanceoffor everyone already catching this one.