Skip to content

registerAsyncErrorEventHandler

Registers an event handler for asynchronous errors.

Import:

import { registerAsyncErrorEventHandler } from 'obsidian-dev-utils/error';

Signature:

function registerAsyncErrorEventHandler(handler: (asyncError: unknown) => void): Disposable

Parameters:

ParameterTypeDescription
handler(asyncError: unknown) => voidThe handler function to be called when an asynchronous error event occurs.

Returns: Disposable — A Disposable that unregisters the handler when disposed, for use with using.