Thin wrapper around the user-provided onError callback. Ensures every error that reaches a consumer is a proper ChartError structure:
onError
ChartError
new Error(String(x))
console.warn
catch {}
Optional
Thin wrapper around the user-provided
onErrorcallback. Ensures every error that reaches a consumer is a properChartErrorstructure:new Error(String(x))onErrorcan't cascadeconsole.warn(never silently dropped, unlike the oldcatch {}pattern)