/** * Register an error handler for the current component. * * Called in the outer function. When the component's outer function or * template function throws during render, every registered handler * receives the error object. The handler does not return anything — * the component renders nothing in production or a dev error message * in development. * * @example * ```ts * const MyComponent: ComponentFn<{}> = () => { * onError((error) => { * reportToSentry(error); * }); * return () => html`