MCPcopy
hub / github.com/Koenkk/zigbee2mqtt / wrappedCallback

Method wrappedCallback

lib/eventBus.ts:250–258  ·  view source on GitHub ↗
(...args: never[])

Source from the content-addressed store, hash-verified

248 }
249
250 const wrappedCallback = async (...args: never[]): Promise<void> => {
251 try {
252 await callback(...args);
253 } catch (error) {
254 logger.error(`EventBus error '${key.constructor.name}/${event}': ${(error as Error).message}`);
255 // biome-ignore lint/style/noNonNullAssertion: always Error
256 logger.debug((error as Error).stack!);
257 }
258 };
259
260 // biome-ignore lint/style/noNonNullAssertion: just created if wasn't valid
261 this.callbacksByExtension.get(key.constructor.name)!.push({event, callback: wrappedCallback});

Callers

nothing calls this directly

Calls 2

errorMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected