Skip to content

Vizel API / core/src / emitVizelError

Function: emitVizelError() ​

ts
function emitVizelError(err, onError): void;

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

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; an .oxlintrc.json override escalates oxlint's no-console rule to error with no allowed methods here, so the call below carries an oxlint-disable-next-line comment.

Parameters ​

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

Returns ​

void

Released under the MIT License.