invokeAsyncSafely
Invokes a Promise and safely handles any errors by catching them and emitting an async error event.
Import:
import { invokeAsyncSafely } from 'obsidian-dev-utils/async';Signature:
function invokeAsyncSafely(asyncFn: () => unknown, stackTrace: string | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
asyncFn | () => unknown | The asynchronous function to invoke safely. |
stackTrace | string | undefined | The stack trace of the source function. |
Returns: void
Links to this page: