emitAsyncErrorEvent
Emits an asynchronous error event.
When a collection window is open (see startCollectingUnhandledAsyncErrors) the error is collected as unhandled unless it is ignored — either because shouldIgnore is true, an startAsyncErrorIgnoreContext scope is active, or a consumer handler is registered.
Import:
import { emitAsyncErrorEvent } from 'obsidian-dev-utils/error';Signature:
function emitAsyncErrorEvent(asyncError: unknown, shouldIgnore: boolean): voidParameters:
| Parameter | Type | Description |
|---|---|---|
asyncError | unknown | The error to emit as an asynchronous error event. |
shouldIgnore | boolean | Whether to treat the error as expected and never collect it as unhandled, regardless of the active ignore context. Used to carry the schedule-time ignore decision of a deferred fire-and-forget rejection. |
Returns: void
Links to this page: