callSafe
[ Function ]
public static callSafe<T extends object, A extends any[]>(
callback: Callback.ICallback<T, A> | null | undefined,
thisArg: T | null | undefined,
...args: A
): Error | undefined;
Calls a Callback function in a safe manner and returns an error object in the event of an exception.
Parameter
Name | Type | Description |
---|---|---|
callback | The Callback function to be called | |
thisArg | This pointer to an object that is to be passed as caller. | |
…args | A | Arguments to be passed to the callback function. |
Return value
Type | Description |
---|---|
Error | undefined | Returns undefined or the error object of an exception. |
![]() | Available from version 1.10 |