Skip to content

Vizel API / core/src / emitVizelError

Function: emitVizelError()

ts
function emitVizelError(err, onError): void;

Defined in: packages/core/src/utils/errorHandling.ts:221

Emit a VizelError through the consumer-supplied onError callback, falling back to console.error when no callback is set and the severity is "error". Warnings without a callback stay silent.

This is the only function inside packages/core/src/ that calls console; Biome's noConsole rule enforces this.

Parameters

ParameterTypeDescription
errVizelErrorThe error to emit.
onError((err) => void) | undefinedOptional consumer callback.

Returns

void

Released under the MIT License.